-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Remove used conformances list #25044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove used conformances list #25044
Conversation
@swift-ci Please test |
@swift-ci Please test source compatibility |
@swift-ci Please test compiler performance |
Build failed |
Build failed |
278a6ca
to
a8bd88b
Compare
@swift-ci Please test |
@swift-ci Please test source compatibility |
Build failed |
Build failed |
Anything added here has a type checked body now, so it no longer serves any purpose.
In preparation for removing the UsedConformances list, immediately complete the conformances here instead of adding them to the list.
…solving associated conformances ConformanceChecker::ensureRequirementsAreSatisfied() modifies the conformance as it resolves each one of its associated conformances, so a re-entrant call can end up corrupting state by adding too many elements to the buffer, or adding elements at the wrong offsets. If TypeChecker::checkConformanceRequirements() was called before ConformanceChecker::resolveTypeWitnesses(), we could re-entrantly call ConformanceChecker::ensureRequirementsAreSatisfied(): TypeChecker::checkConformanceRequirements() => ConformanceChecker::ensureRequirementsAreSatisfied() => Type::subst(), etc => ConformanceChecker::resolveTypeWitnesses() => ConformanceChecker::ensureRequirementsAreSatisfied() The code in SubstitutionMap::lookupConformance() worked around this by checking the failure condition and calling resolveTypeWitness() first, before calling getAssociatedConformance(). Instead, remove this and call resolveTypeWitness() from inside NormalProtocolConformance::getAssociatedConformance().
This was added before we had 'associated conformances', which superceded the inherited conformances concept, so it's been dead for a while.
a8bd88b
to
c9ea70e
Compare
@swift-ci Please test source compatibility |
@swift-ci Please smoke test |
@swift-ci Please test source compatibility |
Follow-up to #25009 and #24872.