2009-10-20 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / gtest-169.cs
blob7c0dcd6c22f23c01fa927417624e1a00b4f96c72
1 class list <A> {
2 public class Cons <T> : list <T> { }
3 public class Nil <T> : list <T> { }
6 class C {
7 public static void Rev<T> (list <T> y) {
8 if (y is list<object>.Cons<T>)
9 System.Console.WriteLine ("Cons");
10 if (y is list<object>.Nil<T>)
11 System.Console.WriteLine ("Nil");
15 class M {
16 static void Main () {
17 C.Rev (new list<object>.Cons <string> ());
18 C.Rev (new list<object>.Nil <string> ());