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

Open
muirdm opened this issue Feb 20, 2021 · 2 comments
Open

x/tools/gopls: bad completion after dangling selector in switch statement #44443

muirdm opened this issue Feb 20, 2021 · 2 comments
Labels
Milestone

Comments

@muirdm
Copy link

@muirdm 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 this to the Unreleased milestone Feb 20, 2021
@findleyr
Copy link
Contributor

@findleyr findleyr commented Feb 20, 2021

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 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: v1.0.0 Feb 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants