Merge pull request #4935 from lambdageek/dev-handles-may
[mono.git] / mcs / tests / test-anon-91.cs
1 using System;
2
3 class A
4 {
5         public A (int v)
6         {
7                 Values = new int [] { v, 1 };
8         }
9         
10         public int[] Values;
11 }
12
13 class C
14 {
15         public delegate void D ();
16         
17         public static int Main ()
18         {
19                 new C ().Test ();
20                 return 0;
21         }
22         
23         void SelectCommand (int v)
24         {
25         }
26         
27         void Test ()
28         {
29                 A[] conflicts = new A []{ new A (1), new A (2), new A (3) };
30                 D d = delegate {
31                                 foreach (A conf in conflicts) {
32                                         foreach (int cmd in conf.Values) {
33                                                 int localCmd = cmd;
34                                                 D d2 = delegate {
35                                                         SelectCommand (localCmd);
36                                                 };
37                                         }
38                                 }
39                         };
40         }
41 }