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: bad completion after dangling selector in switch statement #44443

Closed
muirdm opened this issue Feb 20, 2021 · 3 comments
Closed
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.

Comments

@muirdm
Copy link

muirdm commented Feb 20, 2021

In the below example:

var s struct{ foo int }
switch {
case true:
	s.<>
default:
}

We don't complete properly to "foo" at <>. Our dangling selector fix does not work in this case for some reason.

@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Feb 20, 2021
@gopherbot gopherbot added this to the Unreleased milestone Feb 20, 2021
@findleyr
Copy link
Contributor

Which Go version are you using? This is likely to be a parser issue, and I'm planning to address this class of problem soon, having just been bitten by it.

@muirdm
Copy link
Author

muirdm commented Feb 20, 2021

This was with Go 1.15.6. Looking forward to you fixing everything.

@stamblerre stamblerre modified the milestones: Unreleased, gopls/v1.0.0 Feb 20, 2021
@stamblerre stamblerre added this to To Do in gopls on-deck Feb 28, 2021
@stamblerre
Copy link
Contributor

I can confirm that this is fixed with Go 1.17.

gopls on-deck automation moved this from To Do to Done Jun 28, 2021
@stamblerre stamblerre removed this from Done in gopls on-deck Jun 28, 2021
@stamblerre stamblerre removed this from the gopls/v1.0.0 milestone Jun 28, 2021
@golang golang locked and limited conversation to collaborators Jun 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants