repo.or.cz
/
mcs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
remove NotWorking
[mcs.git]
/
tests
/
test-anon-09.cs
blob
55d3fdd8f7409f5b1d9e3eaa4bcc0757075a58b0
1
//
2
// Tests unary mutator operators on captured variables
3
//
4
using
System
;
5
6
class
X
{
7
delegate void
D
();
8
9
static int
gt
,
gj
;
10
11
static int
Main
()
12
{
13
int
times
=
0
;
14
15
D d
=
delegate
{
16
int
t
=
times
++;
17
int
j
= ++
times
;
18
19
gt
=
t
;
20
gj
=
j
;
21
};
22
d
();
23
24
if
(
gt
!=
0
)
25
return
1
;
26
if
(
gj
!=
2
)
27
return
2
;
28
29
return
0
;
30
}
31
}