projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[runtime] Don't insta-fail when a faulty COM type is encountered. (#5616)
[mono.git]
/
mcs
/
tests
/
test-ref-04.cs
1
class X
2
{
3
int field;
4
5
public static int Main ()
6
{
7
var x = new X ();
8
9
x.field = 5;
10
if (!x.Test1 ())
11
return 1;
12
13
x.Test2 ();
14
15
if (x.Test3 ()++ != 6)
16
return 2;
17
18
if (x.field != 7)
19
return 3;
20
21
return 0;
22
}
23
24
bool Test1 ()
25
{
26
ref var x = ref field;
27
int v = x;
28
++x;
29
30
return x == 6;
31
}
32
33
void Test2 ()
34
{
35
ref int x = ref field;
36
x.ToString ();
37
}
38
39
ref int Test3 ()
40
{
41
ref int l = ref field;
42
ref int v = ref l;
43
return ref l;
44
}
45
}