[ilasm] Don't break arguments compatiblity
[mono-project.git] / mcs / tests / test-anon-06.cs
blob5f238c734147d015685bb0b1df5bb8c9fe6751d5
1 //
2 // Tests capturing of variables
3 //
4 using System;
6 delegate void S ();
8 class X {
9 public static int Main ()
11 int a = 1;
12 if (a != 1)
13 return 1;
15 Console.WriteLine ("A is = " + a);
16 S b= delegate {
17 Console.WriteLine ("on delegate");
18 a = 2;
20 if (a != 1)
21 return 2;
22 b();
23 if (a != 2)
24 return 3;
25 Console.WriteLine ("OK");
26 return 0;