v2 / vlib / v / checker / tests / immutable_map.out
27 lines · 27 sloc · 950 bytes · 0c8ce3bcb9fd4a2e5bd5f991a5a07da976d780d7
Raw
1vlib/v/checker/tests/immutable_map.vv:3:2: error: `m` is immutable, declare it with `mut` to make it mutable
2 1 | fn main() {
3 2 | m := map[string]int{}
4 3 | m['test']++
5 | ^
6 4 | m['test']--
7 5 | _ = m.move()
8vlib/v/checker/tests/immutable_map.vv:4:2: error: `m` is immutable, declare it with `mut` to make it mutable
9 2 | m := map[string]int{}
10 3 | m['test']++
11 4 | m['test']--
12 | ^
13 5 | _ = m.move()
14 6 | m.delete('s')
15vlib/v/checker/tests/immutable_map.vv:5:6: error: `m` is immutable, declare it with `mut` to make it mutable
16 3 | m['test']++
17 4 | m['test']--
18 5 | _ = m.move()
19 | ^
20 6 | m.delete('s')
21 7 | }
22vlib/v/checker/tests/immutable_map.vv:6:2: error: `m` is immutable, declare it with `mut` to make it mutable
23 4 | m['test']--
24 5 | _ = m.move()
25 6 | m.delete('s')
26 | ^
27 7 | }
28