This commit is contained in:
Araq 2015-02-20 16:09:43 +01:00
commit 1e796ed9d9
2 changed files with 5 additions and 1 deletions

View file

@ -492,7 +492,8 @@ proc transformFor(c: PTransf, n: PNode): PTransNode =
var newC = newTransCon(getCurrOwner(c))
newC.forStmt = n
newC.forLoopBody = loopBody
internalAssert iter.kind == skIterator
# this can fail for 'nimsuggest' and 'check':
if iter.kind != skIterator: return result
# generate access statements for the parameters (unless they are constant)
pushTransCon(c, newC)
for i in countup(1, sonsLen(call) - 1):