fixes #3975
This commit is contained in:
parent
b4e2a846e1
commit
8c8825b9ce
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue