[Mono-bugs] [Bug 75848][Nor] New - mcs fails to generate initialization code for fields whose value is a boxed value type

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Aug 19 09:23:24 EDT 2005


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 vargaz at gmail.com.

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

--- shadow/75848	2005-08-19 09:23:24.000000000 -0400
+++ shadow/75848.tmp.10396	2005-08-19 09:23:24.000000000 -0400
@@ -0,0 +1,42 @@
+Bug#: 75848
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: vargaz at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs fails to generate initialization code for fields whose value is a boxed value type
+
+mcs fails to generate initialization code for static fields whose value is 
+a boxed value type.
+
+Testcase:
+
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+using System;
+using System.Threading;
+
+public class Foo
+{
+	public static object BoolValue = (bool)false;
+	public static object ByteValue = (byte)0;
+
+	public static void Main () {
+		Console.WriteLine (BoolValue);
+		Console.WriteLine (ByteValue);
+	}
+}
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+Compiled with mcs, this prints nothing, when compiled with csc, it prints:
+False
+0


More information about the mono-bugs mailing list