summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0266-4.cs
blob: 8ea5ff0cae48658cd85be23cc0d1c277d23523ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// CS0266: Cannot implicitly convert type `Bar' to `X'. An explicit conversion exists (are you missing a cast?)
// Line: 18

public enum Bar
{
	ABar
}

class X
{
	public static explicit operator X (Bar the_bar)
	{
		return new X();
	}
	
	public static void Main ()
	{
		X x = Bar.ABar;
	}
}