[Mono-bugs] [Bug 52569][Wis] Changed - MCS does not handle unboxing to {enum, value type}

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 3 Jan 2004 00:14:22 -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.5282	2004-01-03 00:14:22.000000000 -0500
@@ -1,14 +1,14 @@
 Bug#: 52569
 Product: Mono/Compilers
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Wishlist
 Component: C#
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: bmaurer@users.sf.net               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -32,6 +32,29 @@
 	}
 }
 
 Here we are printing `false false' we should return `true true'
 
 The issue is we are emitting castclass not unbox.
+
+------- Additional Comments From bmaurer@users.sf.net  2004-01-03 00:14 -------
+Ok, this adds another version:
+
+using System;
+enum Foo { Bar }
+struct T {
+	static void Main ()
+	{
+		Enum e = Foo.Bar;
+		ValueType vt = Foo.Bar;
+		ValueType vt2 = 1;
+		
+		Console.WriteLine ((Foo)e  == Foo.Bar);
+		Console.WriteLine ((Foo)vt == Foo.Bar);
+		Console.WriteLine ((int) vt2);
+	}
+}
+
+
+Again, we generate castclass, which is invalid (note that Mono errors
+out while MS emits the address of the boxed instance, is this another
+bug?)