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
[interp] Reduce computation under calc_section mutex
[mono-project.git]
/
mcs
/
tests
/
gtest-587.cs
blob
60484bdec39e3fe2f17aa1877cae1433d23803bc
1
using
System
;
2
3
struct
S
4
{
5
public static implicit operator string
(
S s
)
6
{
7
return
"1"
;
8
}
9
10
public static implicit operator short
? (
S s
)
11
{
12
return
1
;
13
}
14
15
public static implicit operator
E
(
S s
)
16
{
17
return
0
;
18
}
19
}
20
21
public enum
E
22
{
23
}
24
25
class
C
26
{
27
public static int
Main
()
28
{
29
E
?
e
=
0
;
30
const
E e1
= (
E
)
44
;
31
var
res
=
e
==
e1
;
32
if
(
res
!=
false
)
33
return
1
;
34
35
res
=
e1
==
e
;
36
if
(
res
!=
false
)
37
return
2
;
38
39
E e2
=
0
;
40
S s
;
41
var
res2
=
e2
&
s
;
42
if
(
res2
!=
0
)
43
return
3
;
44
45
res2
=
s
&
e2
;
46
if
(
res2
!=
0
)
47
return
4
;
48
49
return
0
;
50
}
51
}