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

test-anon-91.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0ed3b0b6424092ab78f288e1955e8b90345eb513 (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
using System;

class A
{
	public A (int v)
	{
		Values = new int [] { v, 1 };
	}
	
	public int[] Values;
}

class C
{
	public delegate void D ();
	
	public static int Main ()
	{
		new C ().Test ();
		return 0;
	}
	
	void SelectCommand (int v)
	{
	}
	
	void Test ()
	{
		A[] conflicts = new A []{ new A (1), new A (2), new A (3) };
		D d = delegate {
				foreach (A conf in conflicts) {
					foreach (int cmd in conf.Values) {
						int localCmd = cmd;
						D d2 = delegate {
							SelectCommand (localCmd);
						};
					}
				}
			};
	}
}