vxx2 / vlib / v / checker / tests / immutable_field.out
12 lines · 12 sloc · 384 bytes · 1512486d01d4205e7b67ebd679238fa45cd348af
Raw
1vlib/v/checker/tests/immutable_field.vv:8:4: error: field `i1` of struct `Aaa` is immutable
2 6 | fn main() {
3 7 | a := Aaa{1}
4 8 | a.i1 = 2
5 | ~~
6 9 | }
7vlib/v/checker/tests/immutable_field.vv:8:2: error: `a` is immutable, declare it with `mut` to make it mutable
8 6 | fn main() {
9 7 | a := Aaa{1}
10 8 | a.i1 = 2
11 | ^
12 9 | }
13