v2 / vlib / v / checker / tests / array_literal_modify_err.out
18 lines · 18 sloc · 687 bytes · 1512486d01d4205e7b67ebd679238fa45cd348af
Raw
1vlib/v/checker/tests/array_literal_modify_err.vv:2:24: error: array append cannot be used in an expression
2 1 | fn main() {
3 2 | mut nums := [1, 2, 3] << 4
4 | ~~
5 3 | println(nums)
6 4 | }
7vlib/v/checker/tests/array_literal_modify_err.vv:2:14: error: array literal can not be modified
8 1 | fn main() {
9 2 | mut nums := [1, 2, 3] << 4
10 | ~~~~~~~~~
11 3 | println(nums)
12 4 | }
13vlib/v/checker/tests/array_literal_modify_err.vv:3:2: error: `println` can not print void expressions
14 1 | fn main() {
15 2 | mut nums := [1, 2, 3] << 4
16 3 | println(nums)
17 | ~~~~~~~~~~~~~
18 4 | }
19