repo.or.cz
/
mono-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
(DISTFILES): Comment out a few missing files.
[mono-project.git]
/
mcs
/
tests
/
2test-a6.cs
blob
e34d61f6053d736f5e5ec0f5f901a4a4fa3c2ecd
1
//
2
// Tests capturing of double nested variables
3
//
4
delegate void
S
();
5
using
System
;
6
7
class
X
{
8
static int
Main
()
9
{
10
int
i
;
11
S b
=
null
;
12
13
for
(
i
=
0
;
i
<
10
;
i
++){
14
int
j
=
0
;
15
b
=
delegate
{
16
Console
.
WriteLine
(
"i=
{0}
j=
{1}
"
,
i
,
j
);
17
i
=
i
+
1
;
18
j
=
j
+
1
;
19
};
20
}
21
b
();
22
Console
.
WriteLine
(
"i =
{0}
"
,
i
);
23
if
(!
t
(
i
,
11
))
24
return
1
;
25
b
();
26
if
(!
t
(
i
,
12
))
27
return
2
;
28
Console
.
WriteLine
(
"i =
{0}
"
,
i
);
29
return
0
;
30
}
31
32
static bool
t
(
int
a
,
int
b
)
33
{
34
return
a
==
b
;
35
}
36
}