Debian Codegraph @

gopls/internal/test/marker/testdata/references/shadow.txt

raw
1 Test of references in the presence of shadowing.
2
3 -- go.mod --
4 module example.com
5 go 1.12
6
7 -- a/a.go --
8 package a
9
10 func _() {
11 x := 123 //@loc(x1, "x"), refs("x", x1, x1ref)
12 _ = x //@loc(x1ref, "x")
13 {
14 x := "hi" //@loc(x2, "x"), refs("x", x2, x2ref)
15 _ = x //@loc(x2ref, "x")
16 }
17 }