bugfix: echo vs debugEcho

This commit is contained in:
Araq 2012-09-13 17:33:20 +02:00
commit d336cb4957
3 changed files with 26 additions and 6 deletions

View file

@ -686,6 +686,9 @@ proc semEcho(c: PContext, n: PNode): PNode =
for i in countup(1, sonsLen(n) - 1):
var arg = semExprWithType(c, n.sons[i])
n.sons[i] = semExpr(c, buildStringify(c, arg))
let t = n.sons[0].typ
if tfNoSideEffect notin t.flags: incl(c.p.owner.flags, sfSideEffect)
result = n
proc buildEchoStmt(c: PContext, n: PNode): PNode =