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-11 19:02:05 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-09-11 19:02:05 +0200
commit84d122b5c872d7d045516f62e4843189fbb12c9c (patch)
tree00e038d886543b1409fbe080a65d63cc5e86ac7a /compiler/semfields.nim
parentf7d1902043c1bc70ba0bb159a3e8c71b78947ad7 (diff)
downloadNim-84d122b5c872d7d045516f62e4843189fbb12c9c.tar.gz
extended system.type/typeof to support an upcoming 'collect' macro that works much better than sugar.lc
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: