summary refs log tree commit diff stats
path: root/compiler/semfields.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-09-12 10:27:54 +0200
committerGitHub <noreply@github.com>2018-09-12 10:27:54 +0200
commit132eb31e32844a6cb312d9d33d62c522772548b9 (patch)
tree1cc31e9d078d6a35e1845a1ee979d6484509cf28 /compiler/semfields.nim
parentb195204549fa99f18fcf1b4d5b757cc5aa7e9a6e (diff)
parentde02f5fa0a667dc252fec58aef2a9d177c3b2de5 (diff)
downloadNim-132eb31e32844a6cb312d9d33d62c522772548b9.tar.gz
Merge pull request #8949 from nim-lang/araq-for-loop-expressions
For loop expressions
Diffstat (limited to 'compiler/semfields.nim')
-rw-r--r--compiler/semfields.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/semfields.nim b/compiler/semfields.nim
index 869f5ae74..07321f477 100644
--- a/compiler/semfields.nim
+++ b/compiler/semfields.nim
@@ -70,7 +70,7 @@ proc semForObjectFields(c: TFieldsCtx, typ, forLoop, father: PNode) =
     openScope(c.c)
     inc c.c.inUnrolledContext
     let body = instFieldLoopBody(fc, lastSon(forLoop), forLoop)
-    father.add(semStmt(c.c, body))
+    father.add(semStmt(c.c, body, {}))
     dec c.c.inUnrolledContext
     closeScope(c.c)
   of nkNilLit: discard
@@ -145,7 +145,7 @@ proc semForFields(c: PContext, n: PNode, m: TMagic): PNode =
       fc.replaceByFieldName = m == mFieldPairs
       var body = instFieldLoopBody(fc, loopBody, n)
       inc c.inUnrolledContext
-      stmts.add(semStmt(c, body))
+      stmts.add(semStmt(c, body, {}))
       dec c.inUnrolledContext
       closeScope(c)
   else: