Despite a nested break;, a switch is still considered to never break when they all return a value.
Causes EXCEPTION_ILLEGAL_INSTRUCTION in Debug and crashes in Release.
Tested in latest nightly.
class Program
{
public static int Main(String[] args)
{
switch (0) {
case 0:
if (true) { break; }
return 1;
default:
return 2;
}
return 0; // <-- "Unreachable code" warning in IDE
}
}
Despite a nested
break;, a switch is still considered to never break when they all return a value.Causes
EXCEPTION_ILLEGAL_INSTRUCTIONin Debug and crashes in Release.Tested in latest nightly.