fixes #1725
This commit is contained in:
parent
b4c62d5fed
commit
8fb6865b24
2 changed files with 28 additions and 7 deletions
16
tests/iter/tnested_closure_iter.nim
Normal file
16
tests/iter/tnested_closure_iter.nim
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
discard """
|
||||
output: '''0
|
||||
1
|
||||
2'''
|
||||
"""
|
||||
# bug #1725
|
||||
iterator factory(): int {.closure.} =
|
||||
iterator bar(): int {.closure.} =
|
||||
yield 0
|
||||
yield 1
|
||||
yield 2
|
||||
|
||||
for x in bar(): yield x
|
||||
|
||||
for x in factory():
|
||||
echo x
|
||||
Loading…
Add table
Add a link
Reference in a new issue