Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cs0172.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fa6e77ae5783965417c6779655ed102aa995caac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// cs0172.cs: Can not compute type of conditional expression as `X' and `Y' convert implicitly to each other
// Line: 25

class X {
	public static implicit operator X (Y y)
	{
		return null;
	}
}

class Y {
	public static implicit operator Y (X x)
	{
		return null;
	}
}

class Z
{
	static void Main ()
	{
		X x = new X ();
		Y y = new Y ();

		object d = (x == x) ? x : y;
	}
	
}