TypeBuilder.DefineField (UnderlyingValueField, UnderlyingType.GetMetaInfo (),
FieldAttributes.Public | FieldAttributes.SpecialName | FieldAttributes.RTSpecialName);
- if (!RootContext.StdLib)
- Module.hack_corlib_enums.Add (this);
-
return true;
}
ModuleBuilder builder;
- // HACK
- public List<Enum> hack_corlib_enums = new List<Enum> ();
-
bool has_default_charset;
bool has_extenstion_method;
public override void CloseType ()
{
- HackCorlibEnums ();
-
foreach (TypeContainer tc in types) {
tc.CloseType ();
}
#endif
}
- void HackCorlibEnums ()
- {
- if (RootContext.StdLib)
- return;
-
- // Another Mono corlib HACK
- // mono_class_layout_fields requires to have enums created
- // before creating a class which used the enum for any of its fields
- foreach (var e in hack_corlib_enums)
- e.CloseType ();
- }
-
public void InitializePredefinedTypes ()
{
predefined_attributes = new PredefinedAttributes (this);