2004-12-25 Ben Maurer <bmaurer@ximian.com>
[mono-project.git] / mcs / tests / a-parameter3.cs
blob5a3f6a8144dc46e47cc87eaefa28a11a4bf84392
1 // Compiler options: -unsafe
2 using System;
4 delegate int D ();
6 unsafe class X {
8 static int Main ()
10 D x = T (1);
12 int v = x ();
13 Console.WriteLine ("Should be 2={0}", v);
14 return v == 2 ? 0 : 1;
17 static D T (int a)
19 D d = delegate {
20 int *x = &a;
22 *x = *x + 1;
23 return *x;
26 return d;