vxx2 / vlib / v / checker / tests / const_reference_write_err.out
14 lines · 14 sloc · 488 bytes · e995d991f1279d3cee90bc4ea022f6cbcbedba96
Raw
1vlib/v/checker/tests/const_reference_write_err.vv:14:10: error: cannot have mutable reference to const `a_string`
2 12 | }
3 13 | unsafe {
4 14 | ptr := &a_string
5 | ^
6 15 | *ptr = f
7 16 |
8vlib/v/checker/tests/const_reference_write_err.vv:17:11: error: cannot have mutable reference to const `a_struct`
9 15 | *ptr = f
10 16 |
11 17 | ptr2 := &a_struct
12 | ^
13 18 | *ptr2 = a
14 19 | }
15