summary refs log tree commit diff stats
path: root/compiler/semstmts.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-07-15 09:58:57 +0200
committerAraq <rumpf_a@web.de>2014-07-15 09:58:57 +0200
commitfd0e809934f78111f77f273f3edb39053757b97a (patch)
treec68994710a5de654b18a2b3fd689a4b3fdcb480d /compiler/semstmts.nim
parent6d3b632b47d626f6915dc2cbef8745baf04b8d76 (diff)
downloadNim-fd0e809934f78111f77f273f3edb39053757b97a.tar.gz
fixes #1362
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r--compiler/semstmts.nim3
1 files changed, 2 insertions, 1 deletions
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
54' href='#n154'>154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194