fixes #2670
This commit is contained in:
parent
06a8c377e2
commit
4f8d982d5b
2 changed files with 32 additions and 4 deletions
13
tests/template/twhen_gensym.nim
Normal file
13
tests/template/twhen_gensym.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
discard """
|
||||
output: "hi"
|
||||
"""
|
||||
|
||||
# bug #2670
|
||||
template testTemplate(b: bool): stmt =
|
||||
when b:
|
||||
var a = "hi"
|
||||
else:
|
||||
var a = 5
|
||||
echo a
|
||||
|
||||
testTemplate(true)
|
||||
Loading…
Add table
Add a link
Reference in a new issue