summary refs log tree commit diff stats
path: root/compiler/evaltempl.nim
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2019-02-12 22:00:31 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-02-13 23:30:14 +0100
commit28394153aba1e1ec0410406392e26e1e7e2e681e (patch)
tree0f2f455db7375b8e2c1e57b56a7f7d950d955bab /compiler/evaltempl.nim
parent304b1dd34bc52df29528c2a12f769cb59904db5a (diff)
downloadNim-28394153aba1e1ec0410406392e26e1e7e2e681e.tar.gz
32 bit fixes (#10608)
Diffstat (limited to 'compiler/evaltempl.nim')
-rw-r--r--compiler/evaltempl.nim7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/evaltempl.nim b/compiler/evaltempl.nim
index 0f9220102..43c038270 100644
--- a/compiler/evaltempl.nim
+++ b/compiler/evaltempl.nim
@@ -186,9 +186,9 @@ proc evalTemplate*(n: PNode, tmpl, genSymOwner: PSym;
                   renderTree(result, {renderNoComments}))
   else:
     result = copyNode(body)
-    #ctx.instLines = body.kind notin {nkStmtList, nkStmtListExpr,
-    #                                 nkBlockStmt, nkBlockExpr}
-    #if ctx.instLines: result.info = n.info
+    ctx.instLines = sfCallSideLineinfo in tmpl.flags
+    if ctx.instLines:
+      result.info = n.info
     for i in countup(0, safeLen(body) - 1):
       evalTemplateAux(body.sons[i], args, ctx, result)
   result.flags.incl nfFromTemplate
@@ -196,4 +196,3 @@ proc evalTemplate*(n: PNode, tmpl, genSymOwner: PSym;
   #if ctx.debugActive:
   #  echo "instantion of ", renderTree(result, {renderIds})
   dec(conf.evalTemplateCounter)
-