diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-09-12 10:27:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 10:27:54 +0200 |
commit | 132eb31e32844a6cb312d9d33d62c522772548b9 (patch) | |
tree | 1cc31e9d078d6a35e1845a1ee979d6484509cf28 /compiler/semfields.nim | |
parent | b195204549fa99f18fcf1b4d5b757cc5aa7e9a6e (diff) | |
parent | de02f5fa0a667dc252fec58aef2a9d177c3b2de5 (diff) | |
download | Nim-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.nim | 4 |
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: |