golang.org/x/tools/gopls@v0.15.3/internal/test/marker/testdata/references/issue60369.txt (about) 1 Regression test for 'references' bug golang/go#60369: a references 2 query on the embedded type name T in struct{p.T} instead reports all 3 references to the package name p. 4 5 The bug was fixed in release go1.21 of go/types. 6 7 -- flags -- 8 -min_go=go1.21 9 10 -- go.mod -- 11 module example.com 12 go 1.12 13 14 -- a/a.go -- 15 package a 16 17 type A struct{} 18 const C = 0 19 20 -- b/b.go -- 21 package b 22 23 import a "example.com/a" //@loc(adef, "a") 24 type s struct { 25 a.A //@loc(Aref1, "A"), loc(aref1, "a"), refs(Aref1, Aref1, Aref3), refs(aref1, adef, aref1, aref2, aref3) 26 } 27 var _ a.A //@loc(aref2, re" (a)"), loc(Aref2, "A") 28 var _ = s{}.A //@loc(Aref3, "A") 29 const c = a.C //@loc(aref3, "a")