1
0
mirror of https://github.com/golang/go synced 2024-10-01 03:18:33 -06:00
go/internal/lsp/testdata/references/refs.go
Rebecca Stambler df305b82d2 internal/lsp: fix declarations in references
Fixes golang/go#34087

Change-Id: I854c03cd124fe783f838dc53ee76cec5fffa563b
Reviewed-on: https://go-review.googlesource.com/c/tools/+/193379
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-09-05 03:51:44 +00:00

20 lines
380 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
}
var q string //@mark(declQ, "q"),refs("q", declQ, assignQ, bobQ)
func _() {
q = "hello" //@mark(assignQ, "q")
bob := func(_ string) {}
bob(q) //@mark(bobQ, "q")
}