icsharpcode/ILSpy — Issue #300: empty if statement disassembles wrong
Author: barts2108
Created: 2011-12-08 09:07:39+00:00
State: open

case "expect":
if (value.Contains("100-continue"))
{

}
_headers.Add(name, value);
break;

disassemles into

case "expect":
{
if (value.Contains("100-continue"))
{
IL_296:
this._headers.Add(name, value);
return;
}
goto IL_296;
}

causing compiler error

Error	98	No such label 'IL_296' within the scope of the goto statement

Seems that there's something wrong parsing the empty if statement. I also noticed that there is no

break;

for any of the case statements.