Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

37 lines
423 B
C#

using System;
enum MyEnum : byte
{
A = 1,
B = 2,
Z = 255
}
class C
{
public static int Main ()
{
MyEnum? e = MyEnum.A;
byte? b = 255;
MyEnum? res = e + b;
if (res != 0)
return 1;
e = null;
b = 255;
res = e + b;
if (res != null)
return 2;
MyEnum e2 = MyEnum.A;
byte b2 = 1;
MyEnum res2 = e2 + b2;
if (res2 != MyEnum.B)
return 3;
Console.WriteLine ("OK");
return 0;
}
}