| 1 | vlib/v/checker/tests/mut_arg.vv:1:10: notice: unused parameter: `par` |
| 2 | 1 | fn f(mut par []int) { |
| 3 | | ~~~ |
| 4 | 2 | } |
| 5 | 3 | |
| 6 | vlib/v/checker/tests/mut_arg.vv:4:6: notice: unused parameter: `par` |
| 7 | 2 | } |
| 8 | 3 | |
| 9 | 4 | fn g(par []int) { |
| 10 | | ~~~ |
| 11 | 5 | } |
| 12 | 6 | |
| 13 | vlib/v/checker/tests/mut_arg.vv:7:3: warning: automatic referencing/dereferencing is deprecated and will be removed soon (got: 0 references, expected: 1 references) |
| 14 | 5 | } |
| 15 | 6 | |
| 16 | 7 | f([3, 4]) |
| 17 | | ~~~~~~ |
| 18 | 8 | mut a := [1, 2] |
| 19 | 9 | f(a) |
| 20 | vlib/v/checker/tests/mut_arg.vv:9:3: warning: automatic referencing/dereferencing is deprecated and will be removed soon (got: 0 references, expected: 1 references) |
| 21 | 7 | f([3, 4]) |
| 22 | 8 | mut a := [1, 2] |
| 23 | 9 | f(a) |
| 24 | | ^ |
| 25 | 10 | |
| 26 | 11 | g(mut [3, 4]) |
| 27 | vlib/v/checker/tests/mut_arg.vv:7:3: error: function `f` parameter `par` is `mut`, so use `mut [3, 4]` instead |
| 28 | 5 | } |
| 29 | 6 | |
| 30 | 7 | f([3, 4]) |
| 31 | | ~~~~~~ |
| 32 | 8 | mut a := [1, 2] |
| 33 | 9 | f(a) |
| 34 | vlib/v/checker/tests/mut_arg.vv:7:3: error: cannot use `[]int` as `&[]int` in argument 1 to `f` |
| 35 | 5 | } |
| 36 | 6 | |
| 37 | 7 | f([3, 4]) |
| 38 | | ~~~~~~ |
| 39 | 8 | mut a := [1, 2] |
| 40 | 9 | f(a) |
| 41 | vlib/v/checker/tests/mut_arg.vv:9:3: error: function `f` parameter `par` is `mut`, so use `mut a` instead |
| 42 | 7 | f([3, 4]) |
| 43 | 8 | mut a := [1, 2] |
| 44 | 9 | f(a) |
| 45 | | ^ |
| 46 | 10 | |
| 47 | 11 | g(mut [3, 4]) |
| 48 | vlib/v/checker/tests/mut_arg.vv:9:3: error: cannot use `[]int` as `&[]int` in argument 1 to `f` |
| 49 | 7 | f([3, 4]) |
| 50 | 8 | mut a := [1, 2] |
| 51 | 9 | f(a) |
| 52 | | ^ |
| 53 | 10 | |
| 54 | 11 | g(mut [3, 4]) |
| 55 | vlib/v/checker/tests/mut_arg.vv:11:7: error: array literal can not be modified |
| 56 | 9 | f(a) |
| 57 | 10 | |
| 58 | 11 | g(mut [3, 4]) |
| 59 | | ~~~~~~ |
| 60 | 12 | g(mut a) |
| 61 | vlib/v/checker/tests/mut_arg.vv:11:7: error: cannot pass expression as `mut` |
| 62 | 9 | f(a) |
| 63 | 10 | |
| 64 | 11 | g(mut [3, 4]) |
| 65 | | ~~~~~~ |
| 66 | 12 | g(mut a) |
| 67 | vlib/v/checker/tests/mut_arg.vv:11:7: error: `g` parameter `par` is not `mut`, `mut` is not needed` |
| 68 | 9 | f(a) |
| 69 | 10 | |
| 70 | 11 | g(mut [3, 4]) |
| 71 | | ~~~~~~ |
| 72 | 12 | g(mut a) |
| 73 | vlib/v/checker/tests/mut_arg.vv:12:7: error: `g` parameter `par` is not `mut`, `mut` is not needed` |
| 74 | 10 | |
| 75 | 11 | g(mut [3, 4]) |
| 76 | 12 | g(mut a) |
| 77 | | ^ |
| 78 | |