Version Used:
Microsoft Visual Studio 2015 14.0.25123.0 Update 2
.NET Framework 4.6.01038
Steps to Reproduce:
Write code:
static class Program
{
static readonly long x = -(long)int.MinValue;
}
Expected Behavior:
No compiler hints
Actual Behavior:
IDE0004 Cast is redundant
If the cast is removed:
CS0220 The operation overflows at compile time in checked mode
Version Used:
Microsoft Visual Studio 2015 14.0.25123.0 Update 2
.NET Framework 4.6.01038
Steps to Reproduce:
Write code:
Expected Behavior:
No compiler hints
Actual Behavior:
IDE0004 Cast is redundant
If the cast is removed:
CS0220 The operation overflows at compile time in checked mode