[Mono-bugs] [Bug 49836][Nor] New - Problem unboxing with enums
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 19 Oct 2003 05:32:50 -0400 (EDT)
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 lmaloney@bigpond.net.au.
http://bugzilla.ximian.com/show_bug.cgi?id=49836
--- shadow/49836 2003-10-19 05:32:50.000000000 -0400
+++ shadow/49836.tmp.20668 2003-10-19 05:32:50.000000000 -0400
@@ -0,0 +1,40 @@
+Bug#: 49836
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: lmaloney@bigpond.net.au
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Problem unboxing with enums
+
+The following code causes this error with mcs:
+
+error CS1002: Expecting `;'
+
+It compiles OK with MS.NET csc.
+
+public enum TestEnum
+{
+ Value1, Value2
+}
+
+public class TestMain
+{
+ public static void Main()
+ {
+ TestEnum mytestenum;
+ // This compiles ok
+ mytestenum = (TestEnum) Int32.Parse("1");
+ // This doesn't
+ mytestenum = (TestEnum) int.Parse("1");
+ }
+}