summary refs log tree commit diff stats
path: root/compiler/semtempl.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-07-04 20:04:08 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-07-04 20:04:08 +0200
commitdb35ac435be4424b2cb72acd42bb925e7ce39f54 (patch)
tree754564d1500cffd6ca806351bc0c8767c74556b3 /compiler/semtempl.nim
parent86a7054c88a03c2f13bf15191fc681311aa1cc62 (diff)
downloadNim-db35ac435be4424b2cb72acd42bb925e7ce39f54.tar.gz
code cleanup: remove newScopeForIf switch
Diffstat (limited to 'compiler/semtempl.nim')
-rw-r--r--compiler/semtempl.nim3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim
index 75c6bc4bb..2952831e9 100644
--- a/compiler/semtempl.nim
+++ b/compiler/semtempl.nim
@@ -340,9 +340,8 @@ proc semTemplBody(c: var TemplCtx, n: PNode): PNode =
     for i in countup(0, sonsLen(n)-1):
       var it = n.sons[i]
       if it.len == 2:
-        when newScopeForIf: openScope(c)
+        openScope(c)
         it.sons[0] = semTemplBody(c, it.sons[0])
-        when not newScopeForIf: openScope(c)
         it.sons[1] = semTemplBody(c, it.sons[1])
         closeScope(c)
       else: