This commit is contained in:
Andreas Rumpf 2016-01-04 00:51:45 +01:00
commit 8fb6865b24
2 changed files with 28 additions and 7 deletions

View 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