Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gtest-389.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7515bb74cef7d4457a6f0ad74ab51ffd593d332d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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;
	}
}