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

fix defer_test

This commit is contained in:
Alexander Medvednikov 2019-12-08 15:30:14 +03:00
parent c9886e6f42
commit 02eee49d25
2 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ fn set_num(i int, n mut Num) {
if i < 5 {
return
} else {
n.val+=1
n.val++
}
}

View File

@ -41,8 +41,8 @@ fn test_mut_2() {
b.a[zero].v << 5
b.a[0].v[zero] = 3
b.a[0].v[b.a[zero].v[zero]]++
b.a[0].v[b.a[0].v[zero]]++
b.a[0].v[b.a[zero].v[zero]]+= 2 -1 // TODO
b.a[0].v[b.a[0].v[zero]]+= 2 - 1 // TODO
assert b.a[0].v.len == 5
assert b.a[0].v[0] == 3