TypeBuilder = Parent.TypeBuilder.DefineNestedType (Basename, TypeAttr, null, type_size);
}
+ if (DeclaringAssembly.Importer != null)
+ DeclaringAssembly.Importer.AddCompiledType (TypeBuilder, spec);
+
spec.SetMetaInfo (TypeBuilder);
spec.MemberCache = new MemberCache (this);
spec.DeclaringType = Parent.CurrentType;
//
public void SetPredefinedSpec (BuildinTypeSpec spec)
{
+ // When compiling build-in types we start with two
+ // version of same type. One is of BuildinTypeSpec and
+ // second one is ordinary TypeSpec. The unification
+ // happens at later stage when we know which type
+ // really matches the buildin type signature. However
+ // that means TypeSpec create during CreateType of this
+ // type has to be replaced with buildin one
+ //
+ spec.SetMetaInfo (TypeBuilder);
+ spec.MemberCache = this.spec.MemberCache;
+ spec.DeclaringType = this.spec.DeclaringType;
+
this.spec = spec;
+ current_type = null;
}
void UpdateTypeParameterConstraints (TypeContainer part)
ComputeIndexerName();
CheckEqualsAndGetHashCode();
+ if (Kind == MemberKind.Interface && iface_exprs != null) {
+ MemberCache.RemoveHiddenMembers (spec);
+ }
+
return true;
}
!pa.ResolveConstructor (Location, TypeManager.string_type))
return;
- var encoder = new AttributeEncoder (false);
+ var encoder = new AttributeEncoder ();
encoder.Encode (GetAttributeDefaultMember ());
encoder.EncodeEmptyNamedArguments ();