Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / tests / bug-78431.2.cs
1   public class Pair <T> { 
2     public T fst; 
3     public T snd; 
4   }
5   
6   public class RList <T>  {
7     public class Nil : RList <T> {}
8     public class Zero : RList <T> { 
9       public RList <Pair <T> > arg;
10     }
11
12     static int _Length (RList <T> xs) {
13       if (xs is Zero)
14         return RList <Pair <T> >._Length (((Zero)xs).arg);
15       else
16         return 0;
17     }
18     public int Length  {
19       get { 
20         return _Length (this);
21       }
22     }    
23   }
24
25
26 class M { 
27   public static void Main() {
28     int x = (new RList<object>.Nil()).Length;
29   }
30 }
31
32