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

dtest-010.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e38e82d9e480329c43ccaf8a34beedb7dfdbbfb3 (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
class A
{
	public static T Test<T> (T a, T b)
	{
		return b;
	}
}

class C
{
	int TestCall ()
	{
		return 1;
	}

	public static int Main ()
	{
		dynamic d = 0;
		object o = new C ();

		if (A.Test<dynamic> (d, o).TestCall () != 1)
			return 1;

		if (A.Test (d, o).TestCall () != 1)
			return 2;

		return 0;
	}
}