summary refs log tree commit diff stats
path: root/tests/pragmas
diff options
context:
space:
mode:
authorLemonBoy <LemonBoy@users.noreply.github.com>2018-08-23 21:43:10 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-08-23 21:43:10 +0200
commit25f5ea7000a4ae24a45d138307e62c0015d3c4df (patch)
treebecaed9588363c41dd3acee9ac55b29b6502e1ca /tests/pragmas
parent35e37fd8ec721f8588b88fd72c16e36916573908 (diff)
downloadNim-25f5ea7000a4ae24a45d138307e62c0015d3c4df.tar.gz
Validate pragmas attached to for variables (#8749)
Fixes #8741
Diffstat (limited to 'tests/pragmas')
-rw-r--r--tests/pragmas/t8741.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/pragmas/t8741.nim b/tests/pragmas/t8741.nim
new file mode 100644
index 000000000..7398b1030
--- /dev/null
+++ b/tests/pragmas/t8741.nim
@@ -0,0 +1,10 @@
+discard """
+  line: 9
+  errormsg: "attempting to call undeclared routine: 'foobar'"
+"""
+
+for a {.gensym, inject.} in @[1,2,3]:
+  discard
+
+for a {.foobar.} in @[1,2,3]:
+  discard