class A
{
static void Foo()
{
unchecked
{
checked
{
constbyte x = (byte)-1; // error CS0221: Constant value '-1' cannot be converted to a 'byte' (use 'unchecked' syntax to override)
}
}
}
}
I suppose, the problem in CSharpExpressionBase.IsCheckedContext
Description
class A
{
static void Foo()
{
unchecked
{
checked
{
constbyte x = (byte)-1; // error CS0221: Constant value '-1' cannot be converted to a 'byte' (use 'unchecked' syntax to override)
}
}
}
}
I suppose, the problem in CSharpExpressionBase.IsCheckedContext