fixes a collect() bug reported on the forum (#15156) [backport:1.2]
This commit is contained in:
parent
2d494f42f3
commit
64aec6eb85
3 changed files with 12 additions and 2 deletions
|
|
@ -394,3 +394,13 @@ when isMainModule:
|
|||
of "bird": "word"
|
||||
else: d
|
||||
assert z == @["word", "word"]
|
||||
|
||||
|
||||
proc tforum =
|
||||
let ans = collect(newSeq):
|
||||
for y in 0..10:
|
||||
if y mod 5 == 2:
|
||||
for x in 0..y:
|
||||
x
|
||||
|
||||
tforum()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue