mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-07 13:33:22 +00:00
* add testcase
* Update tests/template/twhenintemplates.nim
Co-authored-by: Clyybber <darkmine956@gmail.com>
(cherry picked from commit 98cec6b692)
This commit is contained in:
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)
|
||||
Reference in New Issue
Block a user