projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #5714 from alexischr/update_bockbuild
[mono.git]
/
mcs
/
tests
/
test-anon-81.cs
1
using System;
2
3
class C
4
{
5
public static int Main ()
6
{
7
if (new C ().Test () != 6)
8
return 1;
9
10
return 0;
11
}
12
13
public delegate void Cmd ();
14
public delegate int Cmd2 ();
15
16
int Test ()
17
{
18
int r = Foo2 (delegate () {
19
int x = 4;
20
Foo (delegate () {
21
int y = 6;
22
Foo (delegate () {
23
x = y;
24
});
25
});
26
return x;
27
});
28
29
Console.WriteLine (r);
30
return r;
31
}
32
33
int Foo2 (Cmd2 cmd)
34
{
35
return cmd ();
36
}
37
38
void Foo (Cmd cmd)
39
{
40
cmd ();
41
}
42
}