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

gtest-169.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1d3b467dd3433219be0c174c7a4633afa5e8af3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class list <A> {
	public class Cons <T> : list <T> {   }
	public class Nil <T> : list <T> {  }
}

class C {
	public static void Rev<T> (list <T> y) {
		if (y is list<object>.Cons<T>)
			System.Console.WriteLine ("Cons");
		if (y is list<object>.Nil<T>)
			System.Console.WriteLine ("Nil");
	}
}

class M {
	public static void Main () { 
		C.Rev (new list<object>.Cons <string> ());
		C.Rev (new list<object>.Nil <string> ());
	 }
}