diff options
author | Araq <rumpf_a@web.de> | 2018-10-18 16:53:49 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-10-18 17:00:23 +0200 |
commit | ec4985a5733c9e65e162ece35dca90b37b193f1c (patch) | |
tree | 4db353b7fb8fcf7c1f118d35e9741c85a732ee78 /tests/trmacros | |
parent | 82a1576263c3c64f7a171710c747acc5fa62a52c (diff) | |
download | Nim-ec4985a5733c9e65e162ece35dca90b37b193f1c.tar.gz |
fixes #7972
Diffstat (limited to 'tests/trmacros')
-rw-r--r-- | tests/trmacros/tstmtlist.nim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/trmacros/tstmtlist.nim b/tests/trmacros/tstmtlist.nim index 751acb79a..8261e7c45 100644 --- a/tests/trmacros/tstmtlist.nim +++ b/tests/trmacros/tstmtlist.nim @@ -17,3 +17,18 @@ if true: writeLine stdout, "2" write stdout, "3" echo "4" + +# bug #7972 + +template optimizeLogWrites*{ + write(f, x) + write(f, y) +}(x, y: string{lit}, f: File) = + write(f, x & y) + +proc foo() = + const N = 1 + stdout.write("") + stdout.write("") + +foo() |