summary refs log tree commit diff stats
path: root/tests/template/tunderscore1.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/template/tunderscore1.nim')
-rw-r--r--tests/template/tunderscore1.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/template/tunderscore1.nim b/tests/template/tunderscore1.nim
new file mode 100644
index 000000000..d74e5ba63
--- /dev/null
+++ b/tests/template/tunderscore1.nim
@@ -0,0 +1,11 @@
+discard """
+  errormsg: "the special identifier '_' is ignored in declarations and cannot be used"
+"""
+
+# issue #12094, #13804
+
+template foo =
+  let _ = 1
+  echo _
+
+foo()