1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

array type fix; method registration

This commit is contained in:
Alexander Medvednikov
2020-01-07 13:10:05 +01:00
parent 6d30697d9b
commit d823d82207
5 changed files with 35 additions and 12 deletions

View File

@ -15,6 +15,13 @@ pub:
element_size int
}
/*
struct Foo {
a []string
b [][]string
}
*/
// Internal function, used by V (`nums := []int`)
fn new_array(mylen int, cap int, elm_size int) array {
cap_ := if cap == 0 { 1 } else { cap }