t18113.nim 312 B

123456789101112131415
  1. # ensure template pragma handling doesn't eagerly attempt to add an implicit
  2. # 'pushed' pragma to the evaluation of any intermediate AST prior to
  3. # substitution.
  4. # bug #18113
  5. import sequtils
  6. {.push raises: [Defect].}
  7. var a = toSeq([1, 2, 3, 5, 10]).filterIt(it > 5)
  8. doAssert a.len == 1
  9. doAssert a[0] == 10