-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: rename of receiver var gives spurious shadowing error #60752
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
Comments
This seems like something that can wait for v0.13.0, so moving to that milestone. |
Change https://go.dev/cl/509560 mentions this issue: |
While working on https://go.dev/cl/509875 I temporarily deluded myself that these were two aspects of the same bug. They were not, but I had to do most of the work of fixing this one to figure it out. Bumping this back to v0.12. ;-) |
(Reopened as fix was reverted.) |
Change https://go.dev/cl/543720 mentions this issue: |
(Second attempt at CL 509560, rolled back in a5e8bb0, because it broke tests that had been added since this CL was tested. It was the wrong fix; the right fix is CL 544035 to go/types.) This change documents and tests the go1.22-only fix for a bug in the rename lexical shadowing check due to a bug in go/types. Updates golang/go#60752 Updates golang/go#64292 Change-Id: I9bc96807fdd2ee5c4712268de16cf2d04513773a Reviewed-on: https://go-review.googlesource.com/c/tools/+/543720 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Commit-Queue: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Findley <rfindley@google.com> Auto-Submit: Alan Donovan <adonovan@google.com>
Fixed again. |
There's a bug in the shadowing logic of rename w.r.t. receivers:
The renaming is actually safe, since the receiver is resolved in the package scope.
The text was updated successfully, but these errors were encountered: