diff options
Diffstat (limited to 'tests/template/ttempl2.nim')
-rw-r--r-- | tests/template/ttempl2.nim | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/template/ttempl2.nim b/tests/template/ttempl2.nim index aaa2f1344..e84e0630b 100644 --- a/tests/template/ttempl2.nim +++ b/tests/template/ttempl2.nim @@ -1,12 +1,12 @@ discard """ + errormsg: "undeclared identifier: \'b\'" file: "ttempl2.nim" line: 18 - errormsg: "undeclared identifier: \'b\'" """ -template declareInScope(x: untyped, t: typeDesc): untyped {.immediate.} = +template declareInScope(x: untyped, t: typeDesc): untyped = var x: t -template declareInNewScope(x: untyped, t: typeDesc): untyped {.immediate.} = +template declareInNewScope(x: untyped, t: typeDesc): untyped = # open a new scope: block: var x: t @@ -16,4 +16,3 @@ a = 42 # works, `a` is known here declareInNewScope(b, int) b = 42 #ERROR_MSG undeclared identifier: 'b' - |