summary refs log tree commit diff stats
path: root/tests/errmsgs/tnnodeindex.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/errmsgs/tnnodeindex.nim')
-rw-r--r--tests/errmsgs/tnnodeindex.nim8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/errmsgs/tnnodeindex.nim b/tests/errmsgs/tnnodeindex.nim
new file mode 100644
index 000000000..5e37e7977
--- /dev/null
+++ b/tests/errmsgs/tnnodeindex.nim
@@ -0,0 +1,8 @@
+discard """
+  errormsg: "index 5 not in 0 .. 2"
+  line: 7
+"""
+import macros
+macro t(x: untyped): untyped =
+  result = x[5]
+t([1, 2, 3])