codeowners update
[mono.git] / mcs / tests / gtest-374.cs
1
2 public class Z : IGenericInterface<Z>
3 {
4         public void Stop ()
5         {
6         }
7
8         Z IGenericInterface<Z>.Start ()
9         {
10                 return this;
11         }
12 }
13
14 public interface IGenericInterface<T>
15 {
16         T Start ();
17 }
18
19 public class A<Y, Y2, W>
20         where Y : Z, IGenericInterface<Y>
21         where Y2 : class
22         where W : Y, Y2
23 {
24         public void SomeOperation (W w)
25         {
26                 w.Start ();
27                 w.Stop ();
28         }
29
30         public void SomeOtherOperation (Y y)
31         {
32                 y.Start ();
33                 y.Stop ();
34         }
35 }
36
37 public class Foo
38 {
39         public static int Main ()
40         {
41                 var a = new A<Z, object, Z> ();
42                 a.SomeOperation (new Z ());
43                 a.SomeOtherOperation (new Z ());
44                 return 0;
45         }
46 }