v/vlib/v/checker/tests/assign_immutable_reference_...

8 lines
257 B
Plaintext

vlib/v/checker/tests/assign_immutable_reference_var_err.vv:8:11: error: `x` is immutable, cannot have a mutable reference to an immutable object
6 |
7 | fn y(x &Foo) {
8 | mut m := x
| ^
9 | m.value = 42
10 | }