* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / tests / gtest-079.cs
1 namespace A
2 {
3         public interface IExtensible<T>
4         {
5                 void AddAll<U> (U u)
6                         where U : T;
7         }
8
9         public class ArrayList<T> : IExtensible<T>
10         {
11                 void IExtensible<T>.AddAll<U> (U u)
12                 {
13                         InsertAll (u);
14                 }
15
16                 void InsertAll (T t)
17                 { }
18         }
19 }
20
21 namespace B
22 {
23         public interface IExtensible<S,T>
24         {
25                 void AddAll<U> (U t)
26                         where U : S;
27         }
28
29         public class ArrayList<X,Y> : IExtensible<Y,X>
30         {
31                 public void AddAll<Z> (Z z)
32                         where Z : Y
33                 {
34                         InsertAll (z);
35                 }
36
37                 void InsertAll (Y y)
38                 { }
39         }
40 }
41
42 namespace C
43 {
44         public interface IExtensible<S>
45         {
46                 void AddAll<T> (T t)
47                         where T : S;
48         }
49
50         public class Foo<U>
51         { }
52
53         public class ArrayList<X> : IExtensible<Foo<X>>
54         {
55                 public void AddAll<Y> (Y y)
56                         where Y : Foo<X>
57                 {
58                         InsertAll (y);
59                 }
60
61                 void InsertAll (Foo<X> foo)
62                 { }
63         }
64 }
65
66 class X
67 {
68         static void Main ()
69         { }
70 }