mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 06:18:51 +00:00
* ref 15952 toOpenArray works in JS * fix
This commit is contained in:
13
tests/openarray/topenarray.nim
Normal file
13
tests/openarray/topenarray.nim
Normal file
@@ -0,0 +1,13 @@
|
||||
discard """
|
||||
targets: "c cpp js"
|
||||
"""
|
||||
|
||||
proc pro[T](a: var openArray[T]) = discard
|
||||
|
||||
proc main =
|
||||
var a = [1,2,3,4,5]
|
||||
|
||||
pro(toOpenArray(a, 1, 3))
|
||||
pro(a.toOpenArray(1,3))
|
||||
|
||||
main()
|
||||
Reference in New Issue
Block a user