* ref 15952 toOpenArray works in JS * fix
This commit is contained in:
parent
216be4060a
commit
9bd4f503f4
2 changed files with 32 additions and 10 deletions
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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue