Version Used: 15.3 Preview 3
🔗 Originally filed internally as bug 398604.
Steps to Reproduce:
Add the following method:
public static void MethodName()
{
const long x = ~(long)~1U;
switch (x)
{
case 1:
var y = x;
default:
break;
}
}
Expected Behavior:
IDE0004 is not reported, and no code fix tries to remove the cast to long.
Actual Behavior:
IDE0004 is reported. When the code fix removes the cast to long, the program no longer compiles.
Version Used: 15.3 Preview 3
🔗 Originally filed internally as bug 398604.
Steps to Reproduce:
Add the following method:
Expected Behavior:
IDE0004 is not reported, and no code fix tries to remove the cast to
long.Actual Behavior:
IDE0004 is reported. When the code fix removes the cast to
long, the program no longer compiles.