The following snippet triggers an internal compiler error when the static local variable 'n' has a non-trivial constructor.struct nontrivial{ nontrivial(){}};int main(){ static auto ICE = []()->int{ static nontrivial n; // comment out to resolve error return 0; };}If the static local variable is changed to a type that has a trivial constructor, or if the lambda is changed to non-static, the compilation succeeds as expected.
Visual Studio/Team Foundation Server/.NET Framework Tooling version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results