summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0030-7.cs
blob: 0410ad806d741fd9b4326713b3e6d5152c700bd2 (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
// CS0030: Cannot convert type `S' to `E'
// Line: 10

enum E
{
	V
}

struct S
{
	public static explicit operator int (S val)
	{
		return 1;
	}
}

class C
{
	E Foo ()
	{
		S s = new S ();
		return (E) s;
	}

	public static void Main ()
	{
	}
}