[Mono-bugs] [Bug 52569][Wis] New - MCS does not handle unboxing to {enum, value type}
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 2 Jan 2004 23:57:45 -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=52569
--- shadow/52569 2004-01-02 23:57:45.000000000 -0500
+++ shadow/52569.tmp.4955 2004-01-02 23:57:45.000000000 -0500
@@ -0,0 +1,37 @@
+Bug#: 52569
+Product: Mono/Compilers
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: bmaurer@users.sf.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: MCS does not handle unboxing to {enum, value type}
+
+Description of Problem:
+(Modified from Todd's report on the ML)
+
+using System;
+enum Foo { Bar }
+class T {
+ static void Main ()
+ {
+ Enum e = Foo.Bar;
+ ValueType vt = Foo.Bar;
+
+ Console.WriteLine ((Foo)e == Foo.Bar);
+ Console.WriteLine ((Foo)vt == Foo.Bar);
+ }
+}
+
+Here we are printing `false false' we should return `true true'
+
+The issue is we are emitting castclass not unbox.