mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 11:42:33 +00:00
* add testcase * Update tests/template/twhenintemplates.nim Co-authored-by: Clyybber <darkmine956@gmail.com>
12 lines
165 B
Nim
12 lines
165 B
Nim
# bug #3670
|
|
|
|
template someTempl(someConst: bool) =
|
|
when someConst:
|
|
var a : int
|
|
if true:
|
|
when not someConst:
|
|
var a : int
|
|
a = 5
|
|
|
|
someTempl(true)
|