summary refs log tree commit diff stats
path: root/compiler/semexprs.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semexprs.nim')
-rwxr-xr-xcompiler/semexprs.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index e53db7cec..d60879e0b 100755
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -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 =