protected virtual bool DoResolveTypeParameters ()
{
var tparams = MemberName.TypeParameters;
if (tparams == null)
return true;
var base_context = new BaseContext (this);
for (int i = 0; i < tparams.Count; ++i) {
var tp = tparams[i];
if (!tp.ResolveConstraints (base_context)) {
error = true;
return false;
}
if (IsPartialPart) {
var pc_tp = PartialContainer.CurrentTypeParameters [i];
tp.Create (spec, this);
tp.Define (pc_tp);
if (tp.OptAttributes != null) {
if (pc_tp.OptAttributes == null)
pc_tp.OptAttributes = tp.OptAttributes;
else
pc_tp.OptAttributes.Attrs.AddRange (tp.OptAttributes.Attrs);
}
}
}
if (IsPartialPart) {
PartialContainer.CurrentTypeParameters.UpdateConstraints (this);
}
return true;
}