Fixed yield in nkBlockExpr

This commit is contained in:
Yuriy Glukhov 2018-06-07 00:14:56 +03:00
commit fef60716bf
2 changed files with 29 additions and 2 deletions

View file

@ -393,4 +393,19 @@ block: #7969
test(it, 1, 2, 3)
block: # yield in blockexpr
type
SomeObj = object
id: int
iterator it(): int {.closure.} =
yield(block:
checkpoint(1)
yield 2
3
)
test(it, 1, 2, 3)
echo "ok"