protected override bool DoResolveTypeParameters ()
{
// Although any storey can have type parameters they are all clones of method type
// parameters therefore have to mutate MVAR references in any of cloned constraints
if (type_params != null) {
for (int i = 0; i < type_params.Length; ++i) {
var spec = type_params[i].Type;
spec.BaseType = mutator.Mutate (spec.BaseType);
if (spec.InterfacesDefined != null) {
var mutated = new TypeSpec[spec.InterfacesDefined.Length];
for (int ii = 0; ii < mutated.Length; ++ii) {
mutated[ii] = mutator.Mutate (spec.InterfacesDefined[ii]);
}
spec.InterfacesDefined = mutated;
}
if (spec.TypeArguments != null) {
spec.TypeArguments = mutator.Mutate (spec.TypeArguments);
}
}
}
//
// Update parent cache as we most likely passed the point
// where the cache was constructed
//
Parent.CurrentType.MemberCache.AddMember (this.spec);
return true;
}