diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-03-28 09:50:27 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-03-28 09:50:27 +0200 |
commit | 8c8825b9ce1ec04a812142d85ec1369c4c0d2ca7 (patch) | |
tree | ff674c50dd00b2b9720de30f38976f089113f30e /compiler | |
parent | b4e2a846e1c619988d1f9a74b33d8f3eeafecf94 (diff) | |
download | Nim-8c8825b9ce1ec04a812142d85ec1369c4c0d2ca7.tar.gz |
fixes #3975
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semstmts.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 5d16f2fba..910267e57 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -620,7 +620,8 @@ proc semFor(c: PContext, n: PNode): PNode = result.kind = nkParForStmt else: result = semForFields(c, n, call.sons[0].sym.magic) - elif isCallExpr and call.sons[0].typ.callConv == ccClosure: + elif isCallExpr and call.sons[0].typ.callConv == ccClosure and + tfIterator in call.sons[0].typ.flags: # first class iterator: result = semForVars(c, n) elif not isCallExpr or call.sons[0].kind != nkSym or |