summary refs log tree commit diff stats
path: root/tests/errmsgs/t12844.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/errmsgs/t12844.nim')
-rw-r--r--tests/errmsgs/t12844.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/errmsgs/t12844.nim b/tests/errmsgs/t12844.nim
new file mode 100644
index 000000000..a274b72b4
--- /dev/null
+++ b/tests/errmsgs/t12844.nim
@@ -0,0 +1,13 @@
+discard """
+cmd: "nim check $file"
+errormsg: "invalid type: 'template (args: varargs[string])' for var. Did you mean to call the template with '()'?"
+nimout: '''
+t12844.nim(11, 7) Error: invalid type: 'template (args: varargs[string])' for const. Did you mean to call the template with '()'?
+t12844.nim(12, 5) Error: invalid type: 'template (args: varargs[string])' for var. Did you mean to call the template with '()'?'''
+"""
+
+template z*(args: varargs[string, `$`]) =
+  discard
+const x = z
+var y = z
+