-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
Casts in the switch statements are not preserved, leading to non-compilable code being generated:
Input
public class TestClass
{
public int _Notification(int what)
{
int result = 0;
switch ((long) what)
{
case 1L:
result = 1;
break;
case 2L:
result = 2;
break;
}
return result;
}
}
Incorrect Output (no (long)
in switch
)
public class TestClass
{
public int _Notification(int what)
{
int result = 0;
switch (what)
{
case 1L:
result = 1;
break;
case 2L:
result = 2;
break;
}
return result;
}
}
Details
- Product in use: IlSpyCmd
- Version in use: current master