x/tools/gopls: missing function name in signature when hovering over built-in function #51811
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
gopls version
go env
What did you do?
x.go
and use built-in function likepanic
/recover
/make
/...What did you expect to see?
func(v any)
→func panic(v any)
What did you see instead?
Editor and settings
It doesn't seem to be related to editor setting.
Logs
trace logs:
Possible reason
//https://github.com/golang/tools/blob/5ea13d0d89f92d5ca5468e282dd4ba2ad7503564/internal/lsp/source/hover.go#L576-L581
In the case of
*types.Builtin
onlynode.Type
(ast.FuncDecl.Type) is reserved whileast.FuncDecl.Name
info is discarded. I tried following change and the function name can be shown correctly.
The text was updated successfully, but these errors were encountered: