the following code says
x.type = seq[string]
x.type is seq = true
y.type = array[0..3, string]
y.type is array = true
in fn
x.type = openArray[string]
x.type is seq = false
y.type = openArray[string]
y.type is array = false
but how to get
x.type = seq[string]
x.type is seq = true
y.type = array[0..3, string]
y.type is array = true
in fn
x.type = seq[string]
x.type is seq = true
y.type = array[0..3, string]
y.type is array = true
thanks
import sugar
proc fn(x: openArray[string], y: openArray[string]) =
echo "in fn"
dump x.type
dump x.type is seq
dump y.type
dump y.type is array
var
x = @["1", "2", "3"]
y = ["4", "5", "6", "7"]
dump x.type
dump x.type is seq
dump y.type
dump y.type is array
echo "\n"
fn(x, y)