diff options
Diffstat (limited to 'tests/trmacros/tstar.nim')
-rw-r--r-- | tests/trmacros/tstar.nim | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/tests/trmacros/tstar.nim b/tests/trmacros/tstar.nim deleted file mode 100644 index 86f698232..000000000 --- a/tests/trmacros/tstar.nim +++ /dev/null @@ -1,19 +0,0 @@ -discard """ - output: "my awesome concat" -""" - -var - calls = 0 - -proc `&&`(s: varargs[string]): string = - result = s[0] - for i in 1..len(s)-1: result.add s[i] - inc calls - -template optConc{ `&&` * a }(a: string): string = &&a - -let space = " " -echo "my" && (space & "awe" && "some " ) && "concat" - -# check that it's been optimized properly: -doAssert calls == 1 |