[Mono-bugs] [Bug 75848][Blo] Changed - 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
Wed Aug 24 06:48:04 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 rharinath at novell.com.

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

--- shadow/75848	2005-08-23 21:53:29.000000000 -0400
+++ shadow/75848.tmp.13131	2005-08-24 06:48:04.000000000 -0400
@@ -10,13 +10,12 @@
 Component: C#
 AssignedTo: martin 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:
@@ -52,6 +51,19 @@
 
 ------- Additional Comments From carlos at unixmexico.org  2005-08-22 21:07 -------
 The patch above solves this problem. Could any mantainer review it?
 
 ------- Additional Comments From miguel at ximian.com  2005-08-23 21:53 -------
 martin, please review/approve this oine
+
+------- Additional Comments From rharinath at novell.com  2005-08-24 06:48 -------
+The patch appears incomplete.  What about
+
+  System.ValueType foo = (bool) false;
+
+Also, the formatting needs to follow the coding guidelines.  I'm
+inclined to say that we skip the initialization with the default value
+only if:
+
+  * both types are the same
+  * or the type of the constant is null_type
+


More information about the mono-bugs mailing list