vlib/v/checker/tests/array_or_map_assign_err.vv:5:7: notice: left-side of assignment expects a mutable reference, but variable `a1` is immutable, declare it with `mut` to make it mutable or clone it 3 | a2 := a1 4 | mut a3 := []int{} 5 | a3 = a1 | ~~ 6 | 7 | m1 := { vlib/v/checker/tests/array_or_map_assign_err.vv:12:7: notice: left-side of assignment expects a mutable reference, but variable `m1` is immutable, declare it with `mut` to make it mutable or clone it 10 | m2 := m1 11 | mut m3 := map[string]int{} 12 | m3 = m1 | ~~ 13 | 14 | _ = a2 vlib/v/checker/tests/array_or_map_assign_err.vv:5:5: error: use `array2 = array1.clone()` instead of `array2 = array1` (or use `unsafe`) 3 | a2 := a1 4 | mut a3 := []int{} 5 | a3 = a1 | ^ 6 | 7 | m1 := { vlib/v/checker/tests/array_or_map_assign_err.vv:10:8: error: cannot copy map: call `move` or `clone` method (or use a reference) 8 | 'one': 1 9 | } 10 | m2 := m1 | ~~ 11 | mut m3 := map[string]int{} 12 | m3 = m1 vlib/v/checker/tests/array_or_map_assign_err.vv:12:7: error: cannot copy map: call `move` or `clone` method (or use a reference) 10 | m2 := m1 11 | mut m3 := map[string]int{} 12 | m3 = m1 | ~~ 13 | 14 | _ = a2 vlib/v/checker/tests/array_or_map_assign_err.vv:29:8: error: cannot copy map: call `move` or `clone` method (or use a reference) 27 | 28 | fn foo(mut m map[string]int) { 29 | m2 := m | ^ 30 | m['foo'] = 100 31 | println(m)