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

test-79.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: af3f0266074b0094ee1198898f3278cb1b203fdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//
// This test excercises the compiler being able to compute
// correctly the return type in the presence of null (as null
// will be implicitly convertible to anything
//
class X {

	public static int Main ()
	{
		object o = null;

		string s = o == null ? "string" : null;
		string d = o == null ? null : "string";

		return 0;
	}
}