[Mono-bugs] [Bug 72930][Cos] Changed - CS0133 not reported for const fields of type object

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 25 Feb 2005 16:34:17 -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 nazgul@omega.pl.

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

--- shadow/72930	2005-02-24 03:54:16.000000000 -0500
+++ shadow/72930.tmp.3038	2005-02-25 16:34:17.000000000 -0500
@@ -112,6 +112,15 @@
 is disallowed for a a constant-expression.  But: both reference
 conversions and boxing can generate non-null references from the
 constant-expression.
 
 Probably requires a clarification.
 
+
+------- Additional Comments From nazgul@omega.pl  2005-02-25 16:34 -------
+Maybe of some help:
+http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemReflectionEmitFieldBuilderMethodsTopic.asp
+
+defaultValue is restricted to the following types: Boolean, SByte,
+Int16, Int32, Int64, Byte, UInt16, UInt32, UInt64, Single, Double,
+DateTime, Char, String, and Enum. If the type of the field is Decimal
+or Object, defaultValue can only be null.