mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: fix multi_array index issue
This commit is contained in:
@ -816,3 +816,9 @@ fn test_array_with_cap() {
|
||||
assert a5.len == 1
|
||||
assert a5.cap == 10
|
||||
}
|
||||
|
||||
fn test_mutli_array_index() {
|
||||
mut a := [][]int{len:2, init: []int{len:3, init:0}}
|
||||
a[0][0] = 1
|
||||
assert '$a' == '[[1, 0, 0], [0, 0, 0]]'
|
||||
}
|
||||
|
Reference in New Issue
Block a user