From fd0e809934f78111f77f273f3edb39053757b97a Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 15 Jul 2014 09:58:57 +0200 Subject: fixes #1362 --- compiler/semstmts.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler') diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 3cb9691eb..4d06b201e 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -661,7 +661,8 @@ proc semFor(c: PContext, n: PNode): PNode = n.sons[length-2] = semExprNoDeref(c, n.sons[length-2], {efWantIterator}) var call = n.sons[length-2] let isCallExpr = call.kind in nkCallKinds - if isCallExpr and call[0].kind == nkSym and call[0].sym.magic != mNone: + if isCallExpr and call[0].kind == nkSym and + call[0].sym.magic in {mFields, mFieldPairs, mOmpParFor}: if call.sons[0].sym.magic == mOmpParFor: result = semForVars(c, n) result.kind = nkParForStmt -- cgit 1.4.1-2-gfad0