diff options
Diffstat (limited to 'tests/template/twhenintemplates.nim')
-rw-r--r-- | tests/template/twhenintemplates.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/template/twhenintemplates.nim b/tests/template/twhenintemplates.nim new file mode 100644 index 000000000..6fded856d --- /dev/null +++ b/tests/template/twhenintemplates.nim @@ -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) |