diff options
Diffstat (limited to 'tests/reject/ttempl2.nim')
-rwxr-xr-x | tests/reject/ttempl2.nim | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/tests/reject/ttempl2.nim b/tests/reject/ttempl2.nim deleted file mode 100755 index 142bbb8c7..000000000 --- a/tests/reject/ttempl2.nim +++ /dev/null @@ -1,19 +0,0 @@ -discard """ - file: "ttempl2.nim" - line: 18 - errormsg: "undeclared identifier: \'b\'" -""" -template declareInScope(x: expr, t: typeDesc): stmt {.immediate.} = - var x: t - -template declareInNewScope(x: expr, t: typeDesc): stmt {.immediate.} = - # 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' - |