* add testcase * Update tests/template/twhenintemplates.nim Co-authored-by: Clyybber <darkmine956@gmail.com>
This commit is contained in:
parent
1eb4a38a50
commit
98cec6b692
1 changed files with 11 additions and 0 deletions
11
tests/template/twhenintemplates.nim
Normal file
11
tests/template/twhenintemplates.nim
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
# bug #3670
|
||||||
|
|
||||||
|
template someTempl(someConst: bool) =
|
||||||
|
when someConst:
|
||||||
|
var a : int
|
||||||
|
if true:
|
||||||
|
when not someConst:
|
||||||
|
var a : int
|
||||||
|
a = 5
|
||||||
|
|
||||||
|
someTempl(true)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue