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
[corlib] Fix a few NSLogWriter issues. (#13799)
[mono-project.git]
/
mcs
/
tests
/
test-ref-04.cs
blob
af96f235ce7055c2a073dbbf9012d919f2c20138
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
}