summary refs log tree commit diff stats
path: root/tests/macros/t14227.nim
blob: 4206e2c06134b4b628f3e0d18045859dbd49475a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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)