-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[IDE] Only consider synthesized extensions when in the same module #40566
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
Conversation
@swift-ci please test |
Build failed |
31b37b9
to
f8dc8b4
Compare
@swift-ci please test |
@nkcsgexi it'd be good to get your opinion on this one, do you know why we were grabbing the extended nominal to find the group name? |
Only declarations in the same module as synthesized extension's target are placed within a synthesized extension. We should thus not add "::SYNTHESIZED::" to the USR if the given declaration is in a different and. As an example, `Foundation` adds a method `components(separatedBy:)` to `String` through an extension on `StringProtocol`. But since it is within `Foundation` and not `Swift` it will *not* be in a synthesized extension of `String` or `StringProtocol`. So it should not have "::SYNTHESIZED::" added and should also not being in the `String` group. Resolves rdar://71355632.
f8dc8b4
to
bf0bcfa
Compare
@swift-ci please test |
Build failed |
@swift-ci please test |
Build failed |
@swift-ci please test Linux platform |
@swift-ci please test Windows platform |
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 change makes sense to me!
Only declarations in the same module as synthesized extension's target
are placed within a synthesized extension. We should thus not add
"::SYNTHESIZED::" to the USR if the given declaration is in a different
and.
As an example,
Foundation
adds a methodcomponents(separatedBy:)
toString
through an extension onStringProtocol
. But since it iswithin
Foundation
and notSwift
it will not be in a synthesizedextension of
String
orStringProtocol
. So it should not have"::SYNTHESIZED::" added and should also not being in the
String
group.Resolves rdar://71355632.