-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SourceKit] Merge local refactoring implementations #64298
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 |
Optional<RenameRangeCollector> RangeCollector = | ||
localRenames(SF, StartLoc, StringRef(), Diags); |
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.
findLocalRenameRanges
and the rename refactoring itself were both doing this. Back when I added shorthand shadow handling, I updated one and not the other (didn't see this one).
The two refactorings here are just merging those + changing collectRenameAvailabilityInfo
to just give back the availability info since it was always just a single value, never both.
_ = toRename | ||
} | ||
// RUN: %refactor -rename -dump-text -source-filename %s -pos=%(line+2):29 -new-name=renamed | %FileCheck %s --check-prefix=OPTIONAL | ||
// OPTIONAL: shorthand_shadow.swift [[# @LINE+1]]:29 -> [[# @LINE+1]]:32 |
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.
I think it might be worth keeping a version of this test that is inside a closure. At least in solver-based land they still behave differently than top-level code.
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.
I just moved that to the sourcekitd-test. This one now just checks we handle shorthand shadow correctly from refactor as well.
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.
...oh I forgot to add that file :). Fixed.
178293c
to
c903c88
Compare
@swift-ci please test |
Retrieving local rename ranges and the local rename refactoring both had almost identical methods, except for the addition of retrieving the outermost shadowed decl that was added a couple months back. Merge them. Resolves rdar://106529370.
c903c88
to
d2de8ed
Compare
@swift-ci please test |
Retrieving local rename ranges and the local rename refactoring both had almost identical methods, except for the addition of retrieving the outermost shadowed decl that was added a couple months back. Merge them.
Resolves rdar://106529370.
Resolves #64264