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

test-480.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: eed776f3dc04b7663c44fc702e223e19abd104f6 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
using System;

class A : IDisposable
{
	public A (int v)
	{
	}
	
	public void Dispose ()
	{
	}
}

class C
{
	int b;
	
	delegate void D (int i);
	
	static void Test (object arg)
	{
		const int a2= 9, a3 = a2, a4 = a3, a5 = a4;
		Console.WriteLine (a5);
		
		if (a2 > 0) {
			bool a = false;
		} else {
			const bool a = false;
		}

		for (int i = 0; i < 10; ++i) {
			Console.WriteLine (i);
		}
		
		for (int i = 0; i < 10; ++i) {
			Console.WriteLine (i);
		}
		
		foreach (var i in new int[] { 9, 8 }) {
			Console.WriteLine (i);
		}

		using (A i = new A (1), i2 = new A (2), i3 = new A (3)) {
		}
		
		using (A i = new A (3)) {
		}

		try {
		}
		catch (Exception o) {
			o = null;
		}

		D action = delegate (int i) {
		};
	}

	public static int Main ()
	{
		Test (1);
		return 0;
	}
}