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

gtest-555.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 057481eb19ff4f1405b24a375d78784cd5bdcac5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System;

struct Program
{
	static int Test<T> (T o)
	{
		return o is Program? ? 1 : 2;
	}
	
	public static int Main ()
	{
		if (Test (5) != 2)
			return 1;
		
		Program? a = new Program ();
		if (Test (a) != 1)
			return 2;
		
		return 0;
	}
}