[interp] Reduce computation under calc_section mutex
[mono-project.git] / mcs / tests / test-183.cs
blob7b28aa7d9b1041db65fc6c76cd440d9a0c9b18c2
1 //
2 // This test just verifies that we generate the proper signature for
3 // EndInvoke, something that we were not doing before in the presence
4 // of out parameters
6 using System;
8 class Test
10 delegate int D (int x, out int y);
12 static int M (int x, out int y)
14 y = x + 2;
15 return ++x;
18 public static int Main ()
20 int x = 1;
21 int y = 0;
23 D del = new D (M);
24 IAsyncResult ar = del.BeginInvoke (x, out y, null, null);
25 if (del.EndInvoke (out y, ar) != 2)
26 return 1;
27 if (y != 3)
28 return 2;
30 Console.WriteLine ("Test ok");
31 return 0;