diff options
author | Araq <rumpf_a@web.de> | 2019-07-12 10:11:59 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2019-07-12 10:11:59 +0200 |
commit | eaf4b42ff99b4e7bd77232dc53035e93682aaa73 (patch) | |
tree | e3624c91f4e2b778d58f0909dde6dfaa04b498a8 /tests/js | |
parent | 511b6ae27c1aae27c3f7bb8aed83245a752d4f4c (diff) | |
download | Nim-eaf4b42ff99b4e7bd77232dc53035e93682aaa73.tar.gz |
JS codegen: supports toOpenArray [bugfix]
Diffstat (limited to 'tests/js')
-rw-r--r-- | tests/js/tstringitems.nim | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/js/tstringitems.nim b/tests/js/tstringitems.nim index f09793dde..16df04149 100644 --- a/tests/js/tstringitems.nim +++ b/tests/js/tstringitems.nim @@ -1,6 +1,9 @@ discard """ output: '''Hello -Hello''' +Hello +c +d +e''' """ block: # bug #2581 @@ -85,3 +88,8 @@ block: # String cmp doAssert(cmp("foo", "foobar") == -3) doAssert(cmp("fooz", "foog") == 19) doAssert(cmp("foog", "fooz") == -19) + +proc main(x: openArray[char]) = + for c in x: echo c + +main(toOpenArray(['a', 'b', 'c', 'd', 'e'], 2, 4)) |