Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lang/golang/parser/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ func (p *GoParser) parseSelector(ctx *fileContext, expr *ast.SelectorExpr, infos
// callName := string(ctx.GetRawContent(expr))
// get receiver type name
// var rname string
rev := ctx.getTypeinfo(sel.Recv())
rev := ctx.getTypeinfo(m.Signature().Recv().Type())
// if rev == nil {
// rname = extractName(sel.Recv().String())
// } else {
Expand Down
1 change: 1 addition & 0 deletions lang/lsp/clients_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func TestGolangLSP(t *testing.T) {
// documentSymbol
expectedSymNames := `(MyStruct).String
(MyStructC).String
(MyStructD).DFunction
(MyStructD).String
A
G1
Expand Down
6 changes: 5 additions & 1 deletion testdata/go/0_golang/pkg/entity/entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ type InterfaceB interface {
func (a MyStruct) String() string {
_ = a.Embed.MyStruct
_ = a.MyStructD
return "base struct"
return "base struct" + a.DFunction()
}

func (c MyStructD) DFunction() string {
return "I'm struct d function"
}

func (c MyStructC) String() string {
Expand Down
Loading