mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 17:02:10 -10:00
* constant.cs (Constant.Reduce): Replaced EmitContext with single bool for easier reuse. Updated all overrides. (IntegralConstant): New base class for all integral constants. (IntegralConstant.Error_ValueCannotBeConverted): When assigned value if out of the constant range, report custom error. (UIntConstant.Reduce): Fixed uint conversion. * ecore.cs, literal.cs: Reduce updates. svn path=/trunk/mcs/; revision=58552
12 lines
185 B
C#
12 lines
185 B
C#
// cs0031.cs: Constant value `1022' cannot be converted to a `byte'
|
|
// Line: 9
|
|
|
|
public class Test
|
|
{
|
|
public static void Main()
|
|
{
|
|
unchecked {
|
|
byte b = 1024 - 2;
|
|
}
|
|
}
|
|
} |