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

cs0457-2.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 52af832ac4530cd87a82ba50a02d9bce683b30d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// cs0457: Ambiguous user defined conversions `A.implicit operator byte(A)' and `A.implicit operator sbyte(A)' when converting from 'A' to 'int'
// Line: 20

class A
{
	public static implicit operator ushort (A mask)
	{
		return 1;
	}

	public static implicit operator short (A mask)
	{
		return 2;
	}
}

class X
{
    static A a = null;
    static object o = -a;
}