summary refs log tree commit diff stats
path: root/tests/trmacros
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-04-19 12:11:18 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-04-19 12:11:18 +0200
commitef9a9b119dbcdf00eb66a368efc5e07d0d8d4828 (patch)
treea89c552d0de55ead5a6b031ddb4fc2ddbdec2b35 /tests/trmacros
parent4d56b7da5a9558ac45158b5c614e4aa4e922d864 (diff)
parentd7e8b89eb8f159e0220c48cd06233b7a6a060a72 (diff)
downloadNim-ef9a9b119dbcdf00eb66a368efc5e07d0d8d4828.tar.gz
Merge branch 'devel' of github.com:nim-lang/Nim into devel
Diffstat (limited to 'tests/trmacros')
-rw-r--r--tests/trmacros/tpatterns.nim8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/trmacros/tpatterns.nim b/tests/trmacros/tpatterns.nim
index 6bc8772e3..907973637 100644
--- a/tests/trmacros/tpatterns.nim
+++ b/tests/trmacros/tpatterns.nim
@@ -1,6 +1,7 @@
 discard """
   output: '''48
-hel'''
+hel
+lo'''
 """
 
 template optZero{x+x}(x: int): int = x*3
@@ -15,3 +16,8 @@ s[0] = "hello"
 s[0] = substr(s[0], 0, 2)
 
 echo s[0]
+
+# Test varargs matching
+proc someVarargProc(k: varargs[string]) = doAssert(false) # this should not get called
+template someVarargProcSingleArg{someVarargProc([a])}(a: string) = echo a
+someVarargProc("lo")