repo.or.cz
/
mcs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
avoid using a custom sources file for the net_2_1_raw profile
[mcs.git]
/
errors
/
cs0172.cs
blob
fa6e77ae5783965417c6779655ed102aa995caac
1
// cs0172.cs: Can not compute type of conditional expression as `X' and `Y' convert implicitly to each other
2
// Line: 25
3
4
class
X
{
5
public static implicit operator
X
(
Y y
)
6
{
7
return null
;
8
}
9
}
10
11
class
Y
{
12
public static implicit operator
Y
(
X x
)
13
{
14
return null
;
15
}
16
}
17
18
class
Z
19
{
20
static void
Main
()
21
{
22
X x
=
new
X
();
23
Y y
=
new
Y
();
24
25
object
d
= (
x
==
x
) ?
x
:
y
;
26
}
27
28
}