Skip to content

Commit

Permalink
Merge pull request #360 from visualfc/types_info
Browse files Browse the repository at this point in the history
fix TyTemplateRecvMethod types record
  • Loading branch information
xushiwei authored Jan 30, 2024
2 parents 3bd8cee + d4e39d3 commit 34b84d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ retry:
if recv := denoteRecv(mth); recv != nil {
backup := backupArgs(args)
for i := 0; i < 2; i++ {
tfn := toObject(pkg, ft.Func, nil)
tfn := toObject(pkg, ft.Func, fn.Src)
targs := make([]*internal.Elem, len(args)+1)
targ0 := *recv
if i == 1 {
Expand All @@ -668,7 +668,9 @@ retry:
}
if ret, err = matchFuncCall(pkg, tfn, targs, flags); err == nil {
if pkg.cb.rec != nil {
pkg.cb.rec.Call(fn.Src, ft.Func)
if _, ok := CheckFuncEx(ft.Func.Type().(*types.Signature)); !ok {
pkg.cb.rec.Call(fn.Src, ft.Func)
}
}
return
}
Expand Down
4 changes: 2 additions & 2 deletions codebuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -1701,7 +1701,7 @@ func (p *CodeBuilder) method(
p.rec.Member(src, found)
}
if autoprop {
p.Call(0)
p.CallWith(0, 0, src)
return MemberAutoProperty
}
return MemberMethod
Expand Down Expand Up @@ -1746,7 +1746,7 @@ func (p *CodeBuilder) btiMethod(
p.rec.Member(src, method.fn)
}
if autoprop {
p.Call(0)
p.CallWith(0, 0, src)
return MemberAutoProperty
}
return MemberMethod
Expand Down

0 comments on commit 34b84d8

Please sign in to comment.