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
[tuner] handle the case with multiple "preserve" attributes
[mono-project.git]
/
mcs
/
tests
/
test-null-operator-03.cs
blob
2dec27a104c8a1b834bfbc6ecc18b98cca44c74b
1
using
System
;
2
3
class
C
4
{
5
int
field
;
6
7
int
Test1
()
8
{
9
var
x
=
this
?.
field
;
10
if
(
x
==
null
)
11
return
1
;
12
13
var
x2
=
"abc"
?.
GetHashCode
();
14
if
(
x2
==
null
)
15
return
2
;
16
17
return
0
;
18
}
19
20
static int
Main
()
21
{
22
var
c
=
new
C
();
23
c
.
Test1
();
24
25
const
C c2
=
null
;
26
var
res
=
c2
?.
field
;
27
if
(
res
!=
null
)
28
return
1
;
29
30
Console
.
WriteLine
(
"ok"
);
31
return
0
;
32
}
33
}