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
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.
Milestone

Comments

@muirdm
Copy link

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 Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Jan 20, 2021
@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

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

@stamblerre stamblerre modified the milestones: gopls/v1.0.0, gopls/v0.6.6 Feb 5, 2021
@golang golang locked and limited conversation to collaborators Feb 5, 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

3 participants