1
0
mirror of https://github.com/golang/go synced 2024-11-19 09:04:41 -07:00
go/internal/lsp/testdata/references/refs.go
Suzy Mueller e491332ed8 internal/lsp: compare names when finding references
Objects for builtin types all have position token.NoPos. We do
not want all objects that have position token.NoPos to be matched
when we are looking for references for this object, so we need to
compare the names of the objects as well.

Fixes golang/go#32991

Change-Id: I67e7aba9909ebcbb246203ea5c572debf996c792
Reviewed-on: https://go-review.googlesource.com/c/tools/+/185247
Run-TryBot: Suzy Mueller <suzmue@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-07-09 18:45:27 +00:00

12 lines
212 B
Go

package refs
type i int //@mark(typeInt, "int"),refs("int", typeInt, argInt, returnInt)
func _(_ int) []bool { //@mark(argInt, "int")
return nil
}
func _(_ string) int { //@mark(returnInt, "int")
return 0
}