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

cgen: fix a[0]+='str'

This commit is contained in:
yuyi
2020-06-28 17:16:16 +08:00
committed by GitHub
parent 03829d9935
commit d9409006fa
2 changed files with 22 additions and 6 deletions

View File

@ -871,3 +871,9 @@ fn test_mutli_array_index() {
b[0][0] = 1
assert '$b' == '[[1, 0, 0], [0, 0, 0]]'
}
fn test_plus_assign_string() {
mut a := ['']
a[0] += 'abc'
assert a == ['abc']
}