[ilasm] Don't break arguments compatiblity
[mono-project.git] / mcs / tests / test-anon-27.cs
blobd1607443b0a61ed3063f52b3eb1674a7e2e1daf5
1 using System;
3 delegate void D ();
5 class X {
7 public static int Main ()
9 X x = new X();
10 x.M (10);
11 e ();
12 Console.WriteLine ("J should be 11= {0}", j);
13 e ();
14 Console.WriteLine ("J should be 11= {0}", j);
15 x.M (100);
16 e ();
17 Console.WriteLine ("J should be 101= {0}", j);
18 if (j != 101)
19 return 3;
20 Console.WriteLine ("OK");
21 return 0;
24 static int j;
25 static D e;
27 void M (int a)
29 Console.WriteLine ("A is=" + a);
30 D d = delegate {
31 int b;
32 b = 1;
33 e = delegate {
34 Console.WriteLine ("IN NESTED DELEGATE: {0}", a);
35 j = a + b;
38 d ();