summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0266-13.cs
blob: c2645ce9c2ff88588ae18abb4e7c56e4499bcbec (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
29
30
31
32
33
34
35
// CS0266: Cannot implicitly convert type `int' to `sbyte'. An explicit conversion exists (are you missing a cast?)
// Line: 33

class A3
{
	public static implicit operator sbyte (A3 mask)
	{
		return 1;
	}

	public static implicit operator uint (A3 mask)
	{
		return 6;
	}
	
	public static implicit operator long (A3 mask)
	{
		return 7;
	}

	public static implicit operator ulong (A3 mask)
	{
		return 8;
	}
}


public class C
{
	public static int Main ()
	{
		A3 a3 = null;
		sbyte sa3 = -a3;
	}
}