mirror of
https://github.com/golang/go
synced 2024-11-19 03:24:40 -07:00
df305b82d2
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>
20 lines
380 B
Go
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")
|
|
}
|