projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #4431 from vkargov/vk-leaking-points
[mono.git]
/
mcs
/
tests
/
gtest-initialize-10.cs
1
using System;
2
3
class Foo
4
{
5
public int P { get; set; }
6
}
7
8
class Y
9
{
10
public static int Main ()
11
{
12
Foo foo = new Foo ();
13
foo.P = 1;
14
15
if (!Do (foo))
16
return 1;
17
18
Console.WriteLine ("OK");
19
return 0;
20
}
21
22
static bool Do (Foo f)
23
{
24
f = new Foo () {
25
P = f.P
26
};
27
28
if (f.P != 1)
29
return false;
30
31
Foo f2 = new Foo ();
32
f2.P = 9;
33
f2 = new Foo () {
34
P = f2.P
35
};
36
37
if (f2.P != 9)
38
return false;
39
40
return true;
41
}
42
}