You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AST: Temporarily remove calls to TypeBase::getMinimalCanonicalType()
This is the transform that minimizes a protocol composition according
to generic signature rules, so for example P & C where C already
conforms to P will minimize down to just C.
Unfortunately this calls ASTContext::getOpenedArchetypeSignature(),
which is broken when the protocol composition involves a superclass
constraint containing an interface type.
For example, calling ASTContext::getOpenedArchetypeSignature() on
P & C<T> will build a signature
<Self where Self : P, Self : C<T>>
The generic parameter 'T' occurs as a "free variable", which is
invalid. What we ought to do is build a generic signature with the
outer parameters and requirements of the DeclContext where the
opened existential type appears, and then add 'Self' at the end
of the parameter list.
Until that is implemented, replace these calls with
getCanonicalType() to avoid triggering Requirement Machine
assertions.
0 commit comments