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: invalid struct field completion #43789

Closed
muirdm opened this issue Jan 20, 2021 · 1 comment
Closed

x/tools/gopls: invalid struct field completion #43789

muirdm opened this issue Jan 20, 2021 · 1 comment

Comments

@muirdm
Copy link

@muirdm muirdm commented Jan 20, 2021

package main

type foo struct {
	ABC string
	Payload []byte
}

func main() {
	&foo{
		Paylo<>
	}
}

Completing at <> amusingly gives you string(Payload: []byte,). It seems like part of the code thinks we are completing ABC, and the other part knows it is Payload.

@gopherbot gopherbot added this to the Unreleased milestone Jan 20, 2021
@stamblerre stamblerre modified the milestones: Unreleased, gopls/v1.0.0 Jan 20, 2021
@gopherbot
Copy link

@gopherbot gopherbot commented Feb 3, 2021

Change https://golang.org/cl/289130 mentions this issue: internal/lsp/completion: fix invalid struct literal field snippet

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