// 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 ();
}
// 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;
}