summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorConstantine Molchanov <moigagoo@live.com>2023-02-27 02:56:43 +0300
committerGitHub <noreply@github.com>2023-02-27 00:56:43 +0100
commit4ae598762e7dac1886b481a48ae0875843e5153f (patch)
treeab74d7c4087d57dda3e9f4616ee40fba8c2ec114 /tests
parent425225119a383511ac6f84ba5c02a691e6c51aea (diff)
downloadNim-4ae598762e7dac1886b481a48ae0875843e5153f.tar.gz
fixes #21439; Add tyOpenArray to genTypeInfo. (#21440)
* fixes #21439; Add tyOpenArray to genTypeInfo.

* Add test.
Diffstat (limited to 'tests')
-rw-r--r--tests/js/t21439.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/js/t21439.nim b/tests/js/t21439.nim
new file mode 100644
index 000000000..972356cd0
--- /dev/null
+++ b/tests/js/t21439.nim
@@ -0,0 +1,14 @@
+discard """
+  action: "compile"
+"""
+
+proc test(a: openArray[string]): proc =
+  result = proc =
+    for i in a:
+      discard i
+
+
+const a = ["t1", "t2"]
+
+discard test(a)
+