-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
iterator test(x: int): int {.closure.} =
var b = test
if x == 5: yield 1
else:
yield b(x+1)
var t = test
echo t()Crashes with:
Traceback (most recent call last)
nimrod.nim(79) nimrod
nimrod.nim(55) HandleCmdLine
main.nim(296) MainCommand
main.nim(72) CommandCompileToC
modules.nim(193) CompileProject
modules.nim(151) compileModule
passes.nim(192) processModule
passes.nim(136) processTopLevelStmt
sem.nim(300) myProcess
sem.nim(274) SemStmtAndGenerateGenerics
semstmts.nim(1238) semStmt
semexprs.nim(778) semExprNoType
semexprs.nim(1939) semExpr
semstmts.nim(1055) semIterator
semstmts.nim(1026) semProcAux
transf.nim(710) transformBody
transf.nim(694) processTransf
transf.nim(682) transform
transf.nim(108) transformSons
transf.nim(668) transform
transf.nim(108) transformSons
transf.nim(677) transform
transf.nim(108) transformSons
transf.nim(594) transform
transf.nim(135) transformSym
transf.nim(117) transformSymAux
lambdalifting.nim(715) liftIterSym
lambdalifting.nim(218) getHiddenParam
system.nim(2501) hiddenRaiseAssert
system.nim(1804) raiseAssert
Error: unhandled exception: hidden.Kind == nkSym [EAssertionFailed]
Metadata
Metadata
Assignees
Labels
No labels