This commit is contained in:
Saem Ghani 2021-05-31 04:27:44 -07:00 • committed by GitHub
commit b7ad29e692
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 2 deletions

14
tests/template/t18113.nim Normal file
View file

@ -0,0 +1,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