Open kayabaNerve opened 3 years ago
This gives the same var not init
error:
iterator x(): int {.closure.} =
discard
proc y() =
iterator z(): int {.closure.} =
for a in x():
yield a
let foo = z
y()
/usercode/in.nim(6, 9) Error: internal error: expr: var not init x_4602093
Function
echo
outputs the wrong string.Example
Current Output
Expected Output
Additional Information
Present since at least Nim 1.2.4, is present in latest (1.4.2). Instead of calling x, using
var foo = x
and then calling foo causes a codegen error.