-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix two issues with typealiases in protocol extensions #20654
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
Fix two issues with typealiases in protocol extensions #20654
Conversation
- The GenericSignatureBuilder assumed it didn't have to look in protocol extensions to resolve member types. - Serialization was incorrectly filtering out such typealiases when trying to resolve a cross-module reference to one. rdar://problem/46103190
@swift-ci Please test |
@swift-ci Please test source compatibility |
@swift-ci Please test compiler performance |
Build failed |
auto flags = OptionSet<NominalTypeDecl::LookupDirectFlags>(); | ||
flags |= NominalTypeDecl::LookupDirectFlags::IgnoreNewExtensions; | ||
for (auto member : proto->lookupDirect(name, flags)) { | ||
for (auto member : proto->lookupDirect(name)) { |
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.
Good to see this worked without any fallout!
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.
Great! The reasons why we did this must have gone away.
I'm going to say we take the hit on these counters. Overall time didn't noticeably change. @swift-ci Please smoke test |
- The GenericSignatureBuilder assumed it didn't have to look in protocol extensions to resolve member types. - Serialization was incorrectly filtering out such typealiases when trying to resolve a cross-module reference to one. rdar://problem/46103190 (cherry picked from commit 1f25ea5)
The GenericSignatureBuilder assumed it didn't have to look in protocol extensions to resolve member types.
Serialization was incorrectly filtering out such typealiases when trying to resolve a cross-module reference to one.
rdar://problem/46103190