mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-08 14:03:23 +00:00
* add testcase * Update tests/template/twhenintemplates.nim Co-authored-by: Clyybber <darkmine956@gmail.com>
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