Fixed yield in nkBlockExpr
This commit is contained in:
parent
bf394ed1a1
commit
fef60716bf
2 changed files with 29 additions and 2 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue