Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gtest-023.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 35ca063f6590acc76207fff484a550e795b10aea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
class Foo<T>
{
	public void Hello ()
	{ }

	public void World (T t)
	{
		Hello ();
	}
}

//
// This is some kind of a `recursive' declaration:
//
// Note that we're using the class we're currently defining (Bar)
// as argument of its parent.
//
// Is is important to run the resulting executable since this is
// both a test for the compiler and the runtime.
//

class Bar : Foo<Bar>
{
	public void Test ()
	{
		Hello ();
		World (this);
	}
}

class X
{
	public static void Main ()
	{ }
}