Skip to content

Commit

Permalink
also fixes nim-lang#15314
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Aug 27, 2024
1 parent 2945dd2 commit b5c29fc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/template/topensym.nim
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,15 @@ block: # issue #23865 for templates
123
res
doAssert g(int) == "f"

import std/sequtils

block: # issue #15314
var it: string
var nums = @[1,2,3]

template doubleNums() =
nums.applyIt(it * 2)

doubleNums()
doAssert nums == @[2, 4, 6]

0 comments on commit b5c29fc

Please sign in to comment.