Fix method recursion bug.
Additional checks for method call transformations.
This commit is contained in:
parent
d5b94390dc
commit
52a3acb066
1 changed files with 5 additions and 1 deletions
|
|
@ -624,7 +624,11 @@ proc transformCall(c: PTransf, n: PNode): PTransNode =
|
|||
# bugfix: check after 'transformSons' if it's still a method call:
|
||||
# use the dispatcher for the call:
|
||||
if s.sons[0].kind == nkSym and s.sons[0].sym.kind == skMethod:
|
||||
result = methodCall(s).PTransNode
|
||||
let t = lastSon(s.sons[0].sym.ast)
|
||||
if t.kind == nkSym and sfDispatcher in t.sym.flags:
|
||||
result = methodCall(s).PTransNode
|
||||
else:
|
||||
result = s.PTransNode
|
||||
else:
|
||||
result = s.PTransNode
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue