pkg/proc: fix can not call method of an embedded filed directly (#1691)

`func (v *Variable) findMethod` should support for searching methods of an
embedded filed.

Fixes #1688
This commit is contained in:
chainhelen
2019-09-26 09:37:23 -05:00
committed by Derek Parker
parent 4905cff3c8
commit a82e6d6987
3 changed files with 45 additions and 1 deletions

View File

@ -1181,6 +1181,8 @@ func TestCallFunction(t *testing.T) {
{`strings.Join(stringslice, ",")`, []string{`:string:"one,two,three"`}, nil},
{`strings.LastIndexByte(stringslice[1], 'w')`, []string{":int:1"}, nil},
{`strings.LastIndexByte(stringslice[1], 'o')`, []string{":int:2"}, nil},
{`d.Base.Method()`, []string{ `:int:4` }, nil },
{`d.Method()`, []string{ `:int:4` }, nil },
}
var testcases113 = []testCaseCallFunction{