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

gtest-391.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fbc4644f46be35c04755786c48ad901a17d916cd (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
37
38
39
40
41
42
43
44
using System;

class C
{
	bool Test_1 ()
	{
		bool? xx = null;
		return xx ?? true;
	}
	
	static void Test (object s, EventArgs a)
	{
	}
	
	public static int Main ()
	{
		string a = null;
		string b = null ?? "a";
		if (b != "a")
			return 1;
		
		object z = a ?? null;
		if (z != null)
			return 3;

		string p = default (string) ?? "a";
		if (p != "a")
			return 4;
		
		string p2 = "x" ?? "a";
		if (p2 != "x")
			return 5;

		object arg = null;
		string result = arg as string ?? "";
		
		int? nint = null;
		int? r = nint ?? null;
		
		EventHandler h = new EventHandler (Test) ?? Test;
		
		return 0;
	}
}