New test.
authorMarek Safar <marek.safar@gmail.com>
Wed, 7 Nov 2007 09:07:08 +0000 (09:07 -0000)
committerMarek Safar <marek.safar@gmail.com>
Wed, 7 Nov 2007 09:07:08 +0000 (09:07 -0000)
svn path=/trunk/mcs/; revision=89074

mcs/errors/cs0030-7.cs [new file with mode: 0644]

diff --git a/mcs/errors/cs0030-7.cs b/mcs/errors/cs0030-7.cs
new file mode 100644 (file)
index 0000000..0410ad8
--- /dev/null
@@ -0,0 +1,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 ()
+       {
+       }
+}