mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tests: fix invalid_insert_references_test.vv (#18926)
This commit is contained in:
parent
3b377fc791
commit
00619b0b3f
@ -1,3 +1,10 @@
|
||||
vlib/v/checker/tests/invalid_insert_references_test.vv:4:12: warning: cannot add a referenece to an immutable object to a mutable array
|
||||
2 | fn test_invalid_insert_references() {
|
||||
3 | b := 0
|
||||
4 | mut a := [&b]
|
||||
| ^
|
||||
5 | mut c := 1
|
||||
6 | a << &c
|
||||
vlib/v/checker/tests/invalid_insert_references_test.vv:8:7: error: cannot append `int literal` to `[]&int`
|
||||
6 | a << &c
|
||||
7 | c = 2
|
||||
|
Loading…
Reference in New Issue
Block a user