-
Notifications
You must be signed in to change notification settings - Fork 2.4k
go/analysis/passes/printf: panic when function literal is assigned to the blank identifier #607
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
|
This PR (HEAD: 88e0767) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/725060. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/725060. |
|
Message from Alan Donovan: Patch Set 1: Auto-Submit+1 Code-Review+2 Commit-Queue+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/725060. |
|
Message from Go LUCI: Patch Set 1: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2025-11-27T15:32:27Z","revision":"b9a2af7861b9a2f7e4a36539b606b1a81b42bd85"} Please don’t reply on this GitHub thread. Visit golang.org/cl/725060. |
|
Message from Alan Donovan: Patch Set 1: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/725060. |
|
Message from Go LUCI: Patch Set 1: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/725060. |
|
Message from Go LUCI: Patch Set 1: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/725060. |
…igned to the blank identifier
info.ObjectOf returns nil for the blank identifier ('_'),
which fails the type assertion to *types.Var.
Fixes golang/go#76616
Signed-off-by: Oliver Eikemeier <eikemeier@fillmore-labs.com>
|
This PR (HEAD: d802704) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/725060. Important tips:
|
|
Message from Alan Donovan: Patch Set 3: Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/725060. |
|
Message from Dmitri Shuralyov: Patch Set 3: Auto-Submit+1 Code-Review+1 Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/725060. |
|
Message from Go LUCI: Patch Set 3: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2025-11-28T16:39:28Z","revision":"38a25dd652c513d2cfb959d373233bbe0002ffe2"} Please don’t reply on this GitHub thread. Visit golang.org/cl/725060. |
|
Message from Dmitri Shuralyov: Patch Set 3: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/725060. |
|
Message from Go LUCI: Patch Set 3: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/725060. |
|
Message from Go LUCI: Patch Set 3: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/725060. |
… the blank identifier
the printf analyzer fails on
func _() {
_ = func() {}
}
info.ObjectOf returns nil for the blank identifier ('_'),
which fails the type assertion to *types.Var.
Fixes golang/go#76616
Change-Id: I045c2dd55f92c398614e4e4f90ceeed5718265d2
GitHub-Last-Rev: d802704
GitHub-Pull-Request: #607
Reviewed-on: https://go-review.googlesource.com/c/tools/+/725060
Reviewed-by: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Commit-Queue: Alan Donovan <adonovan@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
|
This PR is being closed because golang.org/cl/725060 has been merged. |
the printf analyzer fails on
func _() {
_ = func() {}
}
info.ObjectOf returns nil for the blank identifier ('_'),
which fails the type assertion to *types.Var.
Fixes golang/go#76616