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

dtest-043.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0308e8866b5c2d1f3d5230b4fe54483626119e65 (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
class A
{
	public static int Main ()
	{
		dynamic d = 'a';
		object o = null;
		
		char ch = o ?? d;
		if (ch != 'a')
			return 1;
		
		const A a = null;
		ch = a ?? d;
		if (ch != 'a')
			return 2;
		
		ch = d ?? 'b';
		if (ch != 'a')
			return 3;
		
		int? n = null;
		dynamic d2 = null;
		var r = n ?? d2;
		
		return 0;
	}
}