x/tools/gopls: callHierarchy/incomingCalls for a top-level function alias returns package declaration #49124
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, with the latest release of gopls, including the current tools master golang/tools@316ba0b.
What operating system and processor architecture are you using (
go env
)?go env
Output (should be irrelevant?)What did you do?
Create
example.go
:Run
gopls
, initialize an LSP exchange and fetch the incoming calls for the functionf
, e.g.:What did you expect to see?
Either return a reference to
alias
as one of the incoming calls off
(i.e. as thoughalias
was a caller off
),or resolve the indirection and include the incoming calls of
alias
(i.e.g
inexample.go
) among the incoming calls off
.What did you see instead?
The returned incoming calls consist of just a reference to the name in the package declaration (
p
inexample.go
).The response for the above example request is:
The text was updated successfully, but these errors were encountered: