Change information
Commit message:
gopls/internal/golang: implement type definition for builtin types
Currently, type definition queries on builtin types such as int
and bool return no results.
Meanwhile, type definition queries on the builtin "error" return
the same location as a normal definition query - its
fake declaration in {builtin,unsafe}.go.
We should make this behavior consistent across all builtin types
by returning the source declaration for both definition and type
definition queries.
Change-Id: Ifb3cea6bd679b6d445afa5caa62799a6bc88160b
Files:
- M gopls/internal/golang/identifier.go
- M gopls/internal/golang/type_definition.go
- M gopls/internal/test/marker/doc.go
- M gopls/internal/test/marker/testdata/typedef/typedef.txt
Change size: S
Delta: 4 files changed, 25 insertions(+), 15 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +2 by Hongxiang Jiang
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI