Skip to content
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: completion includes 'any' in invalid contexts #47669

Open
findleyr opened this issue Aug 12, 2021 · 1 comment
Open

x/tools/gopls: completion includes 'any' in invalid contexts #47669

findleyr opened this issue Aug 12, 2021 · 1 comment
Assignees
Milestone

Comments

@findleyr
Copy link
Contributor

@findleyr findleyr commented Aug 12, 2021

When built with Go 1.18, gopls completion results erroneously include the new predefined type any in contexts where it is invalid (any is only valid for constraints).

We should exclude it whenever we are not completing constraints.

CC @stamblerre @griesemer

@findleyr findleyr self-assigned this Aug 12, 2021
@gopherbot gopherbot added this to the Unreleased milestone Aug 12, 2021
@stamblerre stamblerre removed this from the Unreleased milestone Aug 12, 2021
@stamblerre stamblerre added this to the gopls/v1.0.0 milestone Aug 12, 2021
@gopherbot
Copy link

@gopherbot gopherbot commented Aug 12, 2021

Change https://golang.org/cl/341850 mentions this issue: internal/lsp/source/completion: exclude 'any' from lexical results

gopherbot pushed a commit to golang/tools that referenced this issue Aug 12, 2021
The predeclared 'any' type is only valid when completing constraints. We
should support that properly, but for now exclude it from results so
that our completion tests don't fail on Go 1.18.

For golang/go#47669

Change-Id: I7852f844684a6c03da90bf367d45d732e5d1e9bb
Reviewed-on: https://go-review.googlesource.com/c/tools/+/341850
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants