summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorgenotrance <dev@genotrance.com>2018-09-14 10:09:16 -0500
committerLemonBoy <LemonBoy@users.noreply.github.com>2018-09-14 17:09:16 +0200
commit7af659cf59ce85ea1d928c17475f5174a6ea4e52 (patch)
treeef11bd7fe8161c724a7b8d30f08e608c5d71ddc0
parent382fe446c3926f7976de09b7a1d8ad131912c7b6 (diff)
downloadNim-7af659cf59ce85ea1d928c17475f5174a6ea4e52.tar.gz
Test case for #6163 (#8960)
* Test case for #6163
-rw-r--r--tests/openarray/t6163.nim17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/openarray/t6163.nim b/tests/openarray/t6163.nim
new file mode 100644
index 000000000..ec8c3cd0b
--- /dev/null
+++ b/tests/openarray/t6163.nim
@@ -0,0 +1,17 @@
+discard """
+  exitcode: 0
+  targets: "c cpp js"
+  output: '''19316
+'''
+"""
+
+from future import `->`, `=>`
+from math import `^`, sum
+from sequtils import filter, map, toSeq
+
+proc f: int =
+  toSeq(10..<10_000).filter(a => a == ($a).map(d => (d.ord-'0'.ord).int^4).sum).sum
+
+var a = f()
+
+echo a
\ No newline at end of file