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 to invalid untyped conversion #62141

Closed
findleyr opened this issue Aug 18, 2023 · 1 comment
Closed

x/tools/gopls: completion to invalid untyped conversion #62141

findleyr opened this issue Aug 18, 2023 · 1 comment
Assignees
Labels
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

@findleyr
Copy link
Contributor

From gopls slack (credit @dominikh and @danp):

func _() {
	abcdef := 32
	x := 1.0 / abcd<>

Accepting the completion at <> yields

func _() {
	abcdef := 32
	x := 1.0 / untyped float(abcdef)
}

Oops!

@findleyr findleyr added gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. labels Aug 18, 2023
@findleyr findleyr added this to the gopls/v0.14.0 milestone Aug 18, 2023
@findleyr findleyr self-assigned this Aug 18, 2023
@gopherbot
Copy link

Change https://go.dev/cl/520876 mentions this issue: gopls/internal/lsp/completion: don't suggest converting to untyped types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

2 participants