summary refs log tree commit diff stats
path: root/tests/template
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2017-02-16 21:30:54 +0100
committerAraq <rumpf_a@web.de>2017-02-16 21:30:54 +0100
commit0440aea69158dfde7e315d547f8f2ed474a705c0 (patch)
tree6f2a69b2c57ed5bbcfab0e62ffdaeab699728473 /tests/template
parent61181702d5cf68e4b7a97cac352b395d37ddb702 (diff)
downloadNim-0440aea69158dfde7e315d547f8f2ed474a705c0.tar.gz
fixes #5405
Diffstat (limited to 'tests/template')
-rw-r--r--tests/template/tgensymregression.nim15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/template/tgensymregression.nim b/tests/template/tgensymregression.nim
index e49678fec..e758e0d9a 100644
--- a/tests/template/tgensymregression.nim
+++ b/tests/template/tgensymregression.nim
@@ -1,3 +1,10 @@
+discard """
+  output: '''[0.0, 0.0, 0.0]
+
+[0.0, 0.0, 0.0, 0.0]
+
+5050'''
+"""
 
 template mathPerComponent(op: untyped): untyped =
   proc op*[N,T](v,u: array[N,T]): array[N,T] {.inline.} =
@@ -32,3 +39,11 @@ proc main =
   discard zipWithIndex(@[true, false])
 
 main()
+
+# bug #5405
+
+proc main2() =
+  let s = toSeq(1..100).foldL(a + b)
+  echo s
+
+main2()