parent
2aca748ddd
commit
080bed8b6b
2 changed files with 16 additions and 2 deletions
|
|
@ -1,3 +1,4 @@
|
|||
# bug #14219
|
||||
var vectors = @["a", "b", "c", "d", "e"]
|
||||
|
||||
iterator testVectors(): string =
|
||||
|
|
@ -7,4 +8,14 @@ iterator testVectors(): string =
|
|||
var r = ""
|
||||
for item in testVectors():
|
||||
r.add item
|
||||
echo r
|
||||
echo r
|
||||
|
||||
# bug #12990
|
||||
iterator test(): int {.closure.} =
|
||||
yield 0
|
||||
|
||||
let x = test
|
||||
while true:
|
||||
let val = x()
|
||||
if finished(x): break
|
||||
echo val
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
discard """
|
||||
output: "abcde"
|
||||
output: '''
|
||||
abcde
|
||||
0
|
||||
'''
|
||||
cmd: "nim c --gc:arc $file"
|
||||
"""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue