[Mono-bugs] [Bug 49836][Nor] New - Problem unboxing with enums

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 3 Jan 2004 13:30:59 -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 bmaurer@users.sf.net.

http://bugzilla.ximian.com/show_bug.cgi?id=49836

--- shadow/49836	2004-01-03 13:30:59.000000000 -0500
+++ shadow/49836.tmp.17498	2004-01-03 13:30:59.000000000 -0500
@@ -0,0 +1,53 @@
+Bug#: 49836
+Product: Mono/Compilers
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Normal
+Component: C#
+AssignedTo: martin@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");
+	}
+}
+
+------- Additional Comments From miguel@ximian.com  2003-10-20 18:45 -------
+This bug is related to the typecast conversion in there.  Since Martin
+recently reviewed casts, am assigning this to him.
+
+------- Additional Comments From bmaurer@users.sf.net  2003-11-18 12:28 -------
+*** Bug 51095 has been marked as a duplicate of this bug. ***
+
+------- Additional Comments From bmaurer@users.sf.net  2003-12-24 15:37 -------
+*** Bug 52527 has been marked as a duplicate of this bug. ***
+
+------- Additional Comments From bmaurer@users.sf.net  2004-01-03 13:30 -------
+*** Bug 52579 has been marked as a duplicate of this bug. ***