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

dtest-058.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 23dedf09af204e14e650deee37a9a9045b9e4a78 (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
using System;

class Test
{
	int a;
	int b;

	Test (int i)
	{
		a = 10;
	}

	static Test Foo (dynamic d)
	{
		return new Test (d) {
			b = 20
		};
	}

	public static int Main ()
	{
		var t = Foo (44);
		if (t.a != 10)
			return 1;
		if (t.b != 20)
			return 2;
		
		return 0;
	}
}