golang.org/x/tools/gopls@v0.15.3/internal/test/marker/testdata/references/issue59851.txt (about) 1 Regression test for 'references' bug golang/go#59851. 2 3 -- go.mod -- 4 module example.com 5 go 1.12 6 7 -- a/a.go -- 8 package a 9 10 type Iface interface { 11 Method() 12 } 13 14 type implOne struct{} 15 16 func (implOne) Method() {} //@loc(def1, "Method"), refs(def1, def1, ref1, iref, ireftest) 17 18 var _ = implOne.Method //@loc(ref1, "Method") 19 var _ = Iface(nil).Method //@loc(iref, "Method") 20 21 -- a/a_test.go -- 22 package a 23 24 type implTwo struct{} 25 26 func (implTwo) Method() {} //@loc(def2, "Method"), refs(def2, def2, iref, ref2, ireftest) 27 28 var _ = implTwo.Method //@loc(ref2, "Method") 29 var _ = Iface(nil).Method //@loc(ireftest, "Method")