blob: ec2253cf18fa501d6ea9ea04fb0cb52e048e1ef4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
|