[Mono-bugs] [Bug 50840][Wis] New - Cannot cast to System.IConvertible from System.Enum
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 12 Nov 2003 00:59:41 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by gs234-mono-bugzilla@srcf.ucam.org.
http://bugzilla.ximian.com/show_bug.cgi?id=50840
--- shadow/50840 2003-11-12 00:59:41.000000000 -0500
+++ shadow/50840.tmp.21437 2003-11-12 00:59:41.000000000 -0500
@@ -0,0 +1,50 @@
+Bug#: 50840
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details: Debian Unstable of 2003-11-12
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: gs234-mono-bugzilla@srcf.ucam.org
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Cannot cast to System.IConvertible from System.Enum
+
+Description of Problem:
+MCS cannot cast to System.IConvertible from System.Enum.
+
+Steps to reproduce the problem:
+
+$ cat > test.cs
+using System;
+
+class Test
+{
+ enum MyEnum { A, B, C, D };
+ static void Main ()
+ {
+ MyEnum ee = MyEnum.C;
+ int i = (int) (System.IConvertible) (System.Enum) ee;
+ }
+}
+$ mcs test.cs
+
+Actual Results:
+test.cs(9) error CS0030: Cannot convert type 'System.Enum' to
+'System.IConvertible'
+Compilation failed: 1 error(s), 0 warnings
+
+Expected Results:
+Compilation succeeded.
+
+Additional Information:
+
+This problem was encountered while trying to get the SML.NET compiler from
+http://www.cl.cam.ac.uk/Research/TSG/SMLNET/ working with Mono. The same
+error occurs when compiling smlnet/src/clr/getmeta.cs .