1
0
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:
yuyi 2023-07-21 15:37:57 +08:00 committed by GitHub
parent 3b377fc791
commit 00619b0b3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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