| Priority |
Normal |
| Type | Bug |
| State | Fixed |
| Assignee | Olga Lobacheva |
| Subsystem | No subsystem |
| Affected versions |
No affected versions
|
| Fixed in |
4.0, 3.1
|
| Fixed in build |
Next build |
| Build |
521
|
RSRP-49309 |
'checked' statements are not taken into account during constant expression evaluation |
|
|
class A
{
static void Foo()
{
unchecked
{
checked
{
const byte x = (byte)-1; // error CS0221: Constant value '-1' cannot be converted to a 'byte' (use 'unchecked' syntax to override)
}
}
}
}