1
0
mirror of https://github.com/golang/go synced 2024-11-18 23:44:43 -07:00
go/internal/lsp/testdata/references/refs.go

22 lines
435 B
Go
Raw Normal View History

package refs
type i int //@mark(typeI, "i"),refs("i", typeI, argI, returnI)
func _(_ i) []bool { //@mark(argI, "i")
return nil
}
func _(_ []byte) i { //@mark(returnI, "i")
return 0
}
var q string //@mark(declQ, "q"),refs("q", declQ, assignQ, bobQ)
var Q string //@mark(declExpQ, "Q"), refs("Q", declExpQ, assignExpQ, bobExpQ)
func _() {
q = "hello" //@mark(assignQ, "q")
bob := func(_ string) {}
bob(q) //@mark(bobQ, "q")
}