diff options
Diffstat (limited to 'tests/reject/ttempl2.nim')
-rwxr-xr-x | tests/reject/ttempl2.nim | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/tests/reject/ttempl2.nim b/tests/reject/ttempl2.nim deleted file mode 100755 index fba988f95..000000000 --- a/tests/reject/ttempl2.nim +++ /dev/null @@ -1,21 +0,0 @@ -discard """ - file: "ttempl2.nim" - line: 18 - errormsg: "undeclared identifier: \'b\'" -""" -template declareInScope(x: expr, t: typeDesc): stmt = - var x: t - -template declareInNewScope(x: expr, t: typeDesc): stmt = - # open a new scope: - block: - var x: t - -declareInScope(a, int) -a = 42 # works, `a` is known here - -declareInNewScope(b, int) -b = 42 #ERROR_MSG undeclared identifier: 'b' - - - |