mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
array: minor fixes
This commit is contained in:
@@ -183,9 +183,11 @@ fn modify (numbers mut []int) {
|
||||
}
|
||||
|
||||
fn test_mut_slice() {
|
||||
mut n := [1,2,3]
|
||||
modify(mut n.left(2))
|
||||
mut n := [1,2,3]
|
||||
modify(mut n.left(2))
|
||||
assert n[0] == 777
|
||||
println(n)
|
||||
modify(mut n.right(2))
|
||||
assert n[2] == 777
|
||||
println(n)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user