closes #3670 [add testcase for #3670] (#15808)

* add testcase

* Update tests/template/twhenintemplates.nim

Co-authored-by: Clyybber <darkmine956@gmail.com>
(cherry picked from commit 98cec6b692)
This commit is contained in:
flywind
2020-11-02 02:53:00 +08:00
committed by narimiran
parent 5e7c6b7f7e
commit 98bd81b4a3

View 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)