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
[LoongArch64] Part-5:add loongarch support in some files for LoongArch64. (#21769)
[mono-project.git]
/
mcs
/
tests
/
test-ref-01.cs
blob
60126a3593c980c62266b5b6aa730f07373dc489
1
// Compiler options: -unsafe
2
3
public unsafe class
X
4
{
5
int
field
;
6
int
*
ufield
;
7
8
public static void
Main
()
9
{
10
int
i
=
5
;
11
ref int
j
=
ref
i
;
12
13
var
x
=
new
X
();
14
ref var
v
=
ref
x
.
TestMethod
();
15
}
16
17
ref int
TestMethod
()
18
{
19
return ref
field
;
20
}
21
22
ref int
TestProperty
{
23
get
{
24
return ref
field
;
25
}
26
}
27
28
ref int this
[
long
arg
] {
29
get
{
30
return ref
field
;
31
}
32
}
33
34
unsafe ref int
*
Foo
()
35
{
36
return ref
ufield
;
37
}
38
}