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: 'implementation' doesn't report built-in 'error' interface #59527

Closed
adonovan opened this issue Apr 10, 2023 · 1 comment
Closed
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

@adonovan
Copy link
Member

The gopls implementation subcommand doesn't report the built-in error interface as a result for query on a type that satisfies the interface:

xtools$ git log | head -n 1
commit 40fb89cd55bdb68faa88c52593caafb733cdc880

xtools$ cat a.go
package tools

type E int

func (E) Error() string { return "" }

type MyError interface{ Error() string }

xtools$ go run ./gopls implementation ./a.go:#21
/Users/adonovan/w/xtools/a.go:7:6-13

xtools$ nl -ba /Users/adonovan/w/xtools/a.go | grep 7
     7	type MyError interface{ Error() string }

It should.

@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 Apr 10, 2023
@gopherbot gopherbot added this to the Unreleased milestone Apr 10, 2023
@adonovan adonovan self-assigned this Apr 10, 2023
@gopherbot
Copy link

Change https://go.dev/cl/483535 mentions this issue: gopls/internal/lsp/source: implementation: report builtin 'error'

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

3 participants