Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / gtest-037.cs
1 //
2 // Check whether we're correctly handling `this'.
3 //
4 //
5
6 public class Foo<T,U>
7 {
8         public void Hello (Foo<T,U> foo)
9         {
10         }
11
12         public virtual void Test ()
13         {
14                 //
15                 // Again, this must be encoded as a TypeSpec (Foo<!0,!1>)
16                 // instead of a TypeDef.
17                 Hello (this);
18         }
19 }
20
21 public class Bar<T> : Foo<T,long>
22 {
23         public void Test (Foo<T,long> foo)
24         {
25                 Hello (foo);
26         }
27 }
28
29 public class Baz<T> : Foo<T,string>
30 {
31         public override void Test ()
32         {
33                 Hello (this);
34         }
35 }
36
37 class X
38 {
39         public static void Main ()
40         { }
41 }