2010-04-07 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / test-anon-09.cs
blob55d3fdd8f7409f5b1d9e3eaa4bcc0757075a58b0
1 //
2 // Tests unary mutator operators on captured variables
3 //
4 using System;
6 class X {
7 delegate void D ();
9 static int gt, gj;
11 static int Main ()
13 int times = 0;
15 D d = delegate {
16 int t = times++;
17 int j = ++times;
19 gt = t;
20 gj = j;
22 d ();
24 if (gt != 0)
25 return 1;
26 if (gj != 2)
27 return 2;
29 return 0;