| 1 | vlib/v/checker/tests/array_method_call_immutable_err.vv:7:2: error: `a2` is immutable, declare it with `mut` to make it mutable |
| 2 | 5 | a3 := ['aa', 'bb'] |
| 3 | 6 | |
| 4 | 7 | a2.prepend(a1) |
| 5 | | ~~ |
| 6 | 8 | a1.insert(0, a0) |
| 7 | 9 | a3.sort_with_compare(fn (a &string, b &string) int { |
| 8 | vlib/v/checker/tests/array_method_call_immutable_err.vv:8:2: error: `a1` is immutable, declare it with `mut` to make it mutable |
| 9 | 6 | |
| 10 | 7 | a2.prepend(a1) |
| 11 | 8 | a1.insert(0, a0) |
| 12 | | ~~ |
| 13 | 9 | a3.sort_with_compare(fn (a &string, b &string) int { |
| 14 | 10 | if a < b { |
| 15 | vlib/v/checker/tests/array_method_call_immutable_err.vv:9:2: error: `a3` is immutable, declare it with `mut` to make it mutable |
| 16 | 7 | a2.prepend(a1) |
| 17 | 8 | a1.insert(0, a0) |
| 18 | 9 | a3.sort_with_compare(fn (a &string, b &string) int { |
| 19 | | ~~ |
| 20 | 10 | if a < b { |
| 21 | 11 | return -1 |
| 22 | vlib/v/checker/tests/array_method_call_immutable_err.vv:18:2: error: `a3` is immutable, declare it with `mut` to make it mutable |
| 23 | 16 | return 0 |
| 24 | 17 | }) |
| 25 | 18 | a3.delete(0) |
| 26 | | ~~ |
| 27 | 19 | a2.pop() |
| 28 | 20 | a3.sort() |
| 29 | vlib/v/checker/tests/array_method_call_immutable_err.vv:19:2: error: `a2` is immutable, declare it with `mut` to make it mutable |
| 30 | 17 | }) |
| 31 | 18 | a3.delete(0) |
| 32 | 19 | a2.pop() |
| 33 | | ~~ |
| 34 | 20 | a3.sort() |
| 35 | 21 | |
| 36 | vlib/v/checker/tests/array_method_call_immutable_err.vv:20:2: error: `a3` is immutable, declare it with `mut` to make it mutable |
| 37 | 18 | a3.delete(0) |
| 38 | 19 | a2.pop() |
| 39 | 20 | a3.sort() |
| 40 | | ~~ |
| 41 | 21 | |
| 42 | 22 | b0 := ['aa', 'bb']! |
| 43 | vlib/v/checker/tests/array_method_call_immutable_err.vv:23:2: error: `b0` is immutable, declare it with `mut` to make it mutable |
| 44 | 21 | |
| 45 | 22 | b0 := ['aa', 'bb']! |
| 46 | 23 | b0.sort_with_compare(fn (a &string, b &string) int { |
| 47 | | ~~ |
| 48 | 24 | if a < b { |
| 49 | 25 | return -1 |
| 50 | vlib/v/checker/tests/array_method_call_immutable_err.vv:32:2: error: `b0` is immutable, declare it with `mut` to make it mutable |
| 51 | 30 | return 0 |
| 52 | 31 | }) |
| 53 | 32 | b0.sort() |
| 54 | | ~~ |
| 55 | 33 | } |
| 56 | |