[Mono-bugs] [Bug 21061] New - mcs doesn't always box value types

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
26 Feb 2002 13:46:17 -0000


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 lupus@ximian.com.

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

--- shadow/21061	Tue Feb 26 08:46:17 2002
+++ shadow/21061.tmp.6729	Tue Feb 26 08:46:17 2002
@@ -0,0 +1,35 @@
+Bug#: 21061
+Product: Mono/MCS
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lupus@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs doesn't always box value types
+
+This program doesn't compile correctly: the foo.a and foo.b valuetypes are
+not boxed before calling String.Concat().
+
+using System;
+
+public enum foo:int {
+        a = 0,
+        b = 1
+}
+
+public class Blah {
+
+        static void Main() {
+                Console.WriteLine((int)foo.a + "This works.");
+                Console.WriteLine(foo.b + "This doesn't work.");
+        }
+}