| 1 | vlib/v/checker/tests/invalid_insert_references_test.vv:4:12: warning: cannot add a reference to an immutable object to a mutable array |
| 2 | 2 | fn test_invalid_insert_references() { |
| 3 | 3 | b := 0 |
| 4 | 4 | mut a := [&b] |
| 5 | | ^ |
| 6 | 5 | mut c := 1 |
| 7 | 6 | a << &c |
| 8 | vlib/v/checker/tests/invalid_insert_references_test.vv:8:7: error: cannot append `int literal` to `[]&int` |
| 9 | 6 | a << &c |
| 10 | 7 | c = 2 |
| 11 | 8 | a << 1 |
| 12 | | ^ |
| 13 | 9 | println(a) |
| 14 | 10 | } |
| 15 |