fixes #4632
This commit is contained in:
parent
eb03040d7d
commit
200ccff015
1 changed files with 9 additions and 8 deletions
|
|
@ -1280,14 +1280,15 @@ proc genInfixCall(p: PProc, n: PNode, r: var TCompRes) =
|
||||||
assert(typ.kind == tyProc)
|
assert(typ.kind == tyProc)
|
||||||
genPatternCall(p, n, pat, typ, r)
|
genPatternCall(p, n, pat, typ, r)
|
||||||
return
|
return
|
||||||
gen(p, n.sons[1], r)
|
if n.len != 1:
|
||||||
if r.typ == etyBaseIndex:
|
gen(p, n.sons[1], r)
|
||||||
if r.address == nil:
|
if r.typ == etyBaseIndex:
|
||||||
globalError(n.info, "cannot invoke with infix syntax")
|
if r.address == nil:
|
||||||
r.res = "$1[$2]" % [r.address, r.res]
|
globalError(n.info, "cannot invoke with infix syntax")
|
||||||
r.address = nil
|
r.res = "$1[$2]" % [r.address, r.res]
|
||||||
r.typ = etyNone
|
r.address = nil
|
||||||
add(r.res, "." | "->")
|
r.typ = etyNone
|
||||||
|
add(r.res, "." | "->")
|
||||||
var op: TCompRes
|
var op: TCompRes
|
||||||
if p.target == targetPHP:
|
if p.target == targetPHP:
|
||||||
op.kind = resCallee
|
op.kind = resCallee
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue