* XmlTypeAttribute.cs: added property AnonymousType for 2.0
[mono.git] / mcs / mcs / const.cs
index 3282d6f24bf7ac4517b973687025af49294a0da7..ef9f2b2888ff27247d642f8d54faa7ed9e89e7f7 100644 (file)
@@ -48,7 +48,7 @@ namespace Mono.CSharp {
                        // Constant.Define can be called when the parent type hasn't yet been populated
                        // and it's base types need not have been populated.  So, we defer this check
                        // to the second time Define () is called on this member.
-                       if (ParentContainer.BaseCache == null)
+                       if (Parent.PartialContainer.BaseCache == null)
                                return true;
                        return base.CheckBase ();
                }
@@ -73,9 +73,8 @@ namespace Mono.CSharp {
                        // Decimals cannot be emitted into the constant blob.  So, convert to 'readonly'.
                        if (ttype == TypeManager.decimal_type) {
                                field_attr |= FieldAttributes.InitOnly;
-                               ParentContainer.RegisterFieldForInitialization (this);
-                       }
-                       else {
+                               Parent.PartialContainer.RegisterFieldForInitialization (this);
+                       } else {
                                field_attr |= FieldAttributes.Literal;
                        }