-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
x/tools/gopls: gopls doesn't report errors when a return statement contains undeclared variable #45075
Comments
Thank you for this report, but unfortunately, I'm not able to reproduce the issue. Can you please share your /cc @heschik |
I can reproduce, and will take a look. |
Change https://golang.org/cl/302533 mentions this issue: |
Change https://golang.org/cl/302689 mentions this issue: |
Panics in type error analyzers shouldn't block diagnostics. Fixes golang/go#45075. Change-Id: I897f0949551ab65276371f7ec8140ccb689e5a7b Reviewed-on: https://go-review.googlesource.com/c/tools/+/302533 Trust: Heschi Kreinick <heschi@google.com> Run-TryBot: Heschi Kreinick <heschi@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Rebecca Stambler <rstambler@golang.org> (cherry picked from commit 9b614f5) Reviewed-on: https://go-review.googlesource.com/c/tools/+/302689 Trust: Rebecca Stambler <rstambler@golang.org> Run-TryBot: Rebecca Stambler <rstambler@golang.org>
0.6.9 This is a patch release to fix golang/go#45092. 0.6.8 This is a patch release to fix golang/go#45075. 0.6.7 New analyzers The unusedwrite and nilness analyzers are now available, but they are disabled by default. Note that enabling them permanently may significantly increase memory usage. You can configure analyzers through the analyses setting. Improved hover with time.Duration Hover for any constant of type time.Duration is shown both in nanoseconds and as a human-readable string. Fixes A full list of all issues fixed can be found in the gopls/v0.6.7 milestone. To report a new problem, please file a new issue at https://golang.org/issues/new.
gopls
version: v0.6.7The bug was introduced in golang/tools@144d5ce. The minimal reproducible example:
If we add
var x string
before thereturn
statement, all errors will appear.The text was updated successfully, but these errors were encountered: