This commit is contained in:
Araq 2014-06-30 22:24:08 +02:00
commit 0339b9d386
2 changed files with 29 additions and 1 deletions

View file

@ -546,7 +546,7 @@ proc flattenTree(root: PNode): PNode =
flattenTreeAux(result, root, op)
else:
result = root
proc transformCall(c: PTransf, n: PNode): PTransNode =
var n = flattenTree(n)
var op = getMergeOp(n)
@ -565,6 +565,9 @@ proc transformCall(c: PTransf, n: PNode): PTransNode =
inc(j)
add(result, a.PTransNode)
if len(result) == 2: result = result[1]
elif getMagic(n) == mNBindSym:
# for bindSym(myconst) we MUST NOT perform constant folding:
result = n.PTransNode
else:
let s = transformSons(c, n).PNode
# bugfix: check after 'transformSons' if it's still a method call: