golang.org/x/tools/gopls@v0.15.3/internal/test/marker/testdata/references/issue60622.txt (about)

     1  Regression test for 'references' bug golang/go#60622:
     2  references to methods of generics were missing.
     3  
     4  -- go.mod --
     5  module example.com
     6  go 1.18
     7  
     8  -- a/a.go --
     9  package a
    10  
    11  type G[T any] struct{}
    12  
    13  func (G[T]) M() {} //@loc(Mdef, "M"), refs(Mdef, Mdef, Mref)
    14  
    15  -- b/b.go --
    16  package b
    17  
    18  import "example.com/a"
    19  
    20  func _() {
    21  	new(a.G[int]).M() //@loc(Mref, "M")
    22  }