closes #3583
This commit is contained in:
parent
b018ddca03
commit
27e89eef6b
1 changed files with 9 additions and 1 deletions
|
|
@ -18,7 +18,8 @@ discard """
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
1
|
1
|
||||||
2'''
|
2
|
||||||
|
70'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
when true:
|
when true:
|
||||||
|
|
@ -71,3 +72,10 @@ for x in infinite.take(3):
|
||||||
let inf = infinite
|
let inf = infinite
|
||||||
for x in inf.take(3):
|
for x in inf.take(3):
|
||||||
echo x
|
echo x
|
||||||
|
|
||||||
|
# bug #3583
|
||||||
|
proc foo(f: (iterator(): int)) =
|
||||||
|
for i in f(): echo i
|
||||||
|
|
||||||
|
let fIt = iterator(): int = yield 70
|
||||||
|
foo fIt
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue