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
IDE: Remove bogus use of getCanonicalTypeInContext()
The GenericSig might come from a protocol extension.
The original types in the Requirement come from this generic signature.
However, the Requirement can then be substituted with the base type's
concrete substitutions, and if the base type is a conforming nominal
type, we now have a Requirement whose types are written in terms of
the conforming nominal type's generic signature.
Therefore, the call to getCanonicalTypeInContext() might not produce
correct results, since there's no guarantee the protocol extension's
GenericSignature has the same requirements as the conforming type's.
This used to just silently produce incorrect results, but now asserts
when the RequirementMachine is enabled.
To fix this I replaced these calls with plain old getCanonicalType()
that does not take a GenericSignature.
If we find a case that is now broken as a result of this change, we'll
need to re-introduce some bookkeeping here to keep track of *which*
GenericSignature generates the types in the substituted Requirement.
0 commit comments