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

     1  This test verifies the fix for the crash encountered in golang/go#44806.
     2  
     3  -- go.mod --
     4  module mod.test/symbol
     5  
     6  go 1.18
     7  -- symbol.go --
     8  package symbol
     9  
    10  //@workspacesymbol("m", m)
    11  
    12  type T struct{}
    13  
    14  // We should accept all valid receiver syntax when scanning symbols.
    15  func (*(T)) m1() {}
    16  func (*T) m2()   {}
    17  func (T) m3()    {}
    18  func ((T)) m4()    {}
    19  func ((*T)) m5()   {}
    20  
    21  -- @m --
    22  symbol.go:8:13-15 T.m1 Method
    23  symbol.go:9:11-13 T.m2 Method
    24  symbol.go:10:10-12 T.m3 Method
    25  symbol.go:11:12-14 T.m4 Method
    26  symbol.go:12:13-15 T.m5 Method
    27  symbol.go:5:6-7 symbol.T Struct