diff options
author | flywind <43030857+xflywind@users.noreply.github.com> | 2020-10-30 22:53:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-30 15:53:45 +0100 |
commit | ae86df12af6c00ea74659375b758178cc2d73311 (patch) | |
tree | 684c4b8b9e99493419c8cd171f2e87d6de239962 /tests | |
parent | 2cfe5e0745cf33ed5698378dd16e01ce542f05e5 (diff) | |
download | Nim-ae86df12af6c00ea74659375b758178cc2d73311.tar.gz |
add testcase for #14227 (#15794)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/macros/t14227.nim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/macros/t14227.nim b/tests/macros/t14227.nim new file mode 100644 index 000000000..4206e2c06 --- /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) |