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

* add testcase

* Update tests/template/twhenintemplates.nim

Co-authored-by: Clyybber <darkmine956@gmail.com>
This commit is contained in:
flywind 2020-11-02 02:53:00 +08:00 • committed by GitHub
commit 98cec6b692
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)