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
Merge pull request #1821 from iainx/replace-getline
[mono-project.git]
/
mcs
/
errors
/
cs0172.cs
blob
5c8dc365fc7e68127053d3acf56c3aadc4a62d3d
1
// CS0172: Type of conditional expression cannot be determined 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
}