-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Clean up ProtocolConformance::subst() and fix crash exposed by coroutines work #18978
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
Clean up ProtocolConformance::subst() and fix crash exposed by coroutines work #18978
Conversation
18a05a0
to
d73ccd9
Compare
Instead of using the callback form of SubstitutionMap::get(), let's use the lower-level form that takes the replacement array and conformances array directly, allowing us to bypass several calls of subst() on 'this'.
d73ccd9
to
9cbb944
Compare
@swift-ci Please test |
@swift-ci Please test source compatibility |
I think the assertion failure referenced from the FIXME comment has been fixed.
9cbb944
to
a71710b
Compare
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
@swift-ci Please test source compatibility |
@swift-ci Please test |
@swift-ci Please test source compatibility |
@adrian-prantl Please take a look at the debug info change. |
}); | ||
for (auto ParamType : Sig->getSubstitutableParams()) { | ||
if (!Type(ParamType).subst(SubsMap)->isEqual(ParamType)) | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so much cleaner, thank you!
Fixes https://bugs.swift.org/browse/SR-8643 and simplifies some related code. Also addresses FIXMEs introduced by #18366.