summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-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