Microsoft Visual Studio 2010Version 10.0.40219.1 SP1RelThe following C++ code leads to a compiler crash:class RegisterData{public: RegisterData(const std::string& name, std::function<bool()> fun ) { }};RegisterData TestCrash("%TestCrash", []() -> bool{ try { } catch (std::bad_cast&) { } return true;});int _tmain(int argc, _TCHAR* argv[]){ return 0;}1> CompilerCrashTest.cpp1>d:\users\stefan\projects\compilercrashtest\compilercrashtest\compilercrashtest.cpp(20): fatal error C1001: An internal error has occurred in the compiler.1> (compiler file 'msc1.cpp', line 1420)1> To work around this problem, try simplifying or changing the program near the locations listed above.1> Please choose the Technical Support command on the Visual C++ 1> Help menu, or open the Technical Support help file for more informationThe issue seems to be due to the presence of the try/catch in the lambda body. If I comment out the try catch the crash dissapears.
Visual Studio/Team Foundation Server/.NET Framework Tooling version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results