Updated with review feedback.
[mono.git] / mcs / errors / cs0030-7.cs
1 // CS0030: Cannot convert type `S' to `E'
2 // Line: 10
3
4 enum E
5 {
6         V
7 }
8
9 struct S
10 {
11         public static explicit operator int (S val)
12         {
13                 return 1;
14         }
15 }
16
17 class C
18 {
19         E Foo ()
20         {
21                 S s = new S ();
22                 return (E) s;
23         }
24
25         public static void Main ()
26         {
27         }
28 }