| 1 | vlib/v/checker/tests/mut_assign_ref.vv:10:12: error: `f` is immutable, cannot have a mutable reference to it |
| 2 | 8 | fn main() { |
| 3 | 9 | f := Foo{} |
| 4 | 10 | mut pf := &f |
| 5 | | ^ |
| 6 | 11 | pf = &f |
| 7 | 12 | p := &f |
| 8 | vlib/v/checker/tests/mut_assign_ref.vv:11:7: error: `f` is immutable, cannot have a mutable reference to it |
| 9 | 9 | f := Foo{} |
| 10 | 10 | mut pf := &f |
| 11 | 11 | pf = &f |
| 12 | | ^ |
| 13 | 12 | p := &f |
| 14 | 13 | _ = p |
| 15 | vlib/v/checker/tests/mut_assign_ref.vv:15:11: error: cannot have mutable reference to const `constant` |
| 16 | 13 | _ = p |
| 17 | 14 | |
| 18 | 15 | mut c := &constant |
| 19 | | ^ |
| 20 | 16 | c.value = 200 |
| 21 | 17 | c = &constant |
| 22 | vlib/v/checker/tests/mut_assign_ref.vv:15:11: error: `constant` is immutable, cannot have a mutable reference to it |
| 23 | 13 | _ = p |
| 24 | 14 | |
| 25 | 15 | mut c := &constant |
| 26 | | ^ |
| 27 | 16 | c.value = 200 |
| 28 | 17 | c = &constant |
| 29 | vlib/v/checker/tests/mut_assign_ref.vv:17:6: error: cannot have mutable reference to const `constant` |
| 30 | 15 | mut c := &constant |
| 31 | 16 | c.value = 200 |
| 32 | 17 | c = &constant |
| 33 | | ^ |
| 34 | 18 | ic := &constant |
| 35 | 19 | _ = ic |
| 36 | vlib/v/checker/tests/mut_assign_ref.vv:17:6: error: `constant` is immutable, cannot have a mutable reference to it |
| 37 | 15 | mut c := &constant |
| 38 | 16 | c.value = 200 |
| 39 | 17 | c = &constant |
| 40 | | ^ |
| 41 | 18 | ic := &constant |
| 42 | 19 | _ = ic |
| 43 | vlib/v/checker/tests/mut_assign_ref.vv:18:8: error: cannot have mutable reference to const `constant` |
| 44 | 16 | c.value = 200 |
| 45 | 17 | c = &constant |
| 46 | 18 | ic := &constant |
| 47 | | ^ |
| 48 | 19 | _ = ic |
| 49 | 20 | |
| 50 | |