add testcase for #14227 (#15794)

(cherry picked from commit ae86df12af)
This commit is contained in:
flywind
2020-10-30 22:53:45 +08:00
committed by narimiran
parent f6f1594cef
commit e085010e59

23
tests/macros/t14227.nim Normal file
View File

@@ -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)