summary refs log tree commit diff stats
path: root/tests/template/t18113.nim
blob: a84b3fd0ebc15dbd80552c1b5a83400930be04dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# ensure template pragma handling doesn't eagerly attempt to add an implicit
# 'pushed' pragma to the evaluation of any intermediate AST prior to
# substitution.
 
# bug #18113

import sequtils

{.push raises: [Defect].}

var a = toSeq([1, 2, 3, 5, 10]).filterIt(it > 5)

doAssert a.len == 1
doAssert a[0] == 10