Skip to content

Commit

Permalink
add testcase for #14227 (#15794)
Browse files Browse the repository at this point in the history
(cherry picked from commit ae86df1)
  • Loading branch information
ringabout authored and narimiran committed Nov 5, 2020
1 parent f6f1594 commit e085010
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/macros/t14227.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
discard """
action: "compile"
"""
import sugar


block:
let y = @[@[1, 2], @[2, 4, 6]]
let x = collect(newSeq):
for i in y:
if i.len > 2:
for j in i:
j
echo(x)

block:
let y = @[@[1, 2], @[2, 4, 6]]
let x = collect(newSeq):
for i in y:
for j in i:
if i.len > 2:
j
echo(x)

0 comments on commit e085010

Please sign in to comment.