Skip to content

Commit

Permalink
tests: fix invalid_insert_references_test.vv (#18926)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyi98 committed Jul 21, 2023
1 parent 3b377fc commit 00619b0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions vlib/v/checker/tests/invalid_insert_references_test.out
@@ -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
Expand Down

0 comments on commit 00619b0

Please sign in to comment.