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-123.cs
blob
bd793f9f1a6bec4464774000c91c054c9650b6ad
1
class
X
{
2
3
static object
get_non_null
()
4
{
5
return new
X
();
6
}
7
8
static object
get_null
()
9
{
10
return null
;
11
}
12
13
public static int
Main
()
14
{
15
int
a
=
5
;
16
object
o
;
17
decimal
d
=
0
M
;
18
19
//
20
// compile time
21
//
22
if
(!(
get_non_null
()
is object
))
23
return
1
;
24
25
if
(
get_null
()
is object
)
26
return
2
;
27
28
if
(!(
a
is object
))
29
return
3
;
30
31
//
32
// explicit reference
33
//
34
if
(
null is object
)
35
return
4
;
36
37
o
=
a
;
38
if
(!(
o
is int
))
39
return
5
;
40
41
if
(
d
is int
)
42
return
6
;
43
44
object
oi
=
1
;
45
if
(!(
oi
is int
))
46
return
7
;
47
48
System
.
Console
.
WriteLine
(
"Is tests pass"
);
49
return
0
;
50
}
51
}