simple closure iterator calling closure iterator works; refs #3837
This commit is contained in:
parent
e1828733f1
commit
39b25cf4dc
2 changed files with 29 additions and 9 deletions
14
tests/iter/t2closureiters.nim
Normal file
14
tests/iter/t2closureiters.nim
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
discard """
|
||||
output: '''1'''
|
||||
"""
|
||||
# bug #3837
|
||||
|
||||
iterator t1(): int {.closure.} =
|
||||
yield 1
|
||||
|
||||
iterator t2(): int {.closure.} =
|
||||
for i in t1():
|
||||
yield i
|
||||
|
||||
for i in t2():
|
||||
echo $i
|
||||
Loading…
Add table
Add a link
Reference in a new issue