summary refs log tree commit diff stats
path: root/tests/reject/ttempl2.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/reject/ttempl2.nim')
-rwxr-xr-xtests/reject/ttempl2.nim19
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'
-