-// cs0266.cs: Cannot implicitly convert type `long' to `int'. An explicit conversion exists (are you missing a cast?)
-// Line: 7
-// Compiler options: -unsafe
+// CS0266: Cannot implicitly convert type `Bar' to `X'. An explicit conversion exists (are you missing a cast?)
+// Line: 18
-public unsafe struct C
+public enum Bar
{
- private fixed long test_1 [200000000000];
+ ABar
}
+class X
+{
+ public static explicit operator X (Bar the_bar)
+ {
+ return new X();
+ }
+
+ public static void Main ()
+ {
+ X x = Bar.ABar;
+ }
+}