Merge pull request #5439 from alexrp/master
[mono.git] / mcs / tests / gtest-023.cs
1 class Foo<T>
2 {
3         public void Hello ()
4         { }
5
6         public void World (T t)
7         {
8                 Hello ();
9         }
10 }
11
12 //
13 // This is some kind of a `recursive' declaration:
14 //
15 // Note that we're using the class we're currently defining (Bar)
16 // as argument of its parent.
17 //
18 // Is is important to run the resulting executable since this is
19 // both a test for the compiler and the runtime.
20 //
21
22 class Bar : Foo<Bar>
23 {
24         public void Test ()
25         {
26                 Hello ();
27                 World (this);
28         }
29 }
30
31 class X
32 {
33         public static void Main ()
34         { }
35 }