From ae86df12af6c00ea74659375b758178cc2d73311 Mon Sep 17 00:00:00 2001 From: flywind <43030857+xflywind@users.noreply.github.com> Date: Fri, 30 Oct 2020 22:53:45 +0800 Subject: [PATCH] add testcase for #14227 (#15794) --- tests/macros/t14227.nim | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/macros/t14227.nim diff --git a/tests/macros/t14227.nim b/tests/macros/t14227.nim new file mode 100644 index 0000000000..4206e2c061 --- /dev/null +++ b/tests/macros/t14227.nim @@ -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)