projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
imported everything from my branch (which is slightly harmless).
[mono.git]
/
mcs
/
tests
/
test-anon-26.cs
1
// Compiler options: -unsafe
2
using System;
3
4
delegate int D ();
5
6
unsafe class X {
7
8
static int Main ()
9
{
10
D x = T (1);
11
12
int v = x ();
13
Console.WriteLine ("Should be 2={0}", v);
14
return v == 2 ? 0 : 1;
15
}
16
17
static D T (int a)
18
{
19
D d = delegate {
20
int *x = &a;
21
22
*x = *x + 1;
23
return *x;
24
};
25
26
return d;
27
}
28
}