From 00619b0b3f3a0581a18b431585c76d328b7ec723 Mon Sep 17 00:00:00 2001 From: yuyi Date: Fri, 21 Jul 2023 15:37:57 +0800 Subject: [PATCH] tests: fix invalid_insert_references_test.vv (#18926) --- vlib/v/checker/tests/invalid_insert_references_test.out | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vlib/v/checker/tests/invalid_insert_references_test.out b/vlib/v/checker/tests/invalid_insert_references_test.out index a0f28a019d..fb47f1a050 100644 --- a/vlib/v/checker/tests/invalid_insert_references_test.out +++ b/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