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

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

class Program
{
	bool Test<T> (T t) where T : class
	{
		return t == this;
	}
	
	public static int Main ()
	{
		var p = new Program ();

		if (p.Test ("a"))
			return 1;
		
		if (!p.Test (p))
			return 2;

		return 0;
	}
}