v2 / vlib / v / checker / tests / fn_args.out
61 lines · 61 sloc · 1.86 KB · 2b041128ad1d2e400aa60412eb30e0413f00c420
Raw
1vlib/v/checker/tests/fn_args.vv:1:8: notice: unused parameter: `a`
2 1 | fn uu8(a u8) {}
3 | ^
4 2 |
5 3 | fn arr(a []int) {}
6vlib/v/checker/tests/fn_args.vv:3:8: notice: unused parameter: `a`
7 1 | fn uu8(a u8) {}
8 2 |
9 3 | fn arr(a []int) {}
10 | ^
11 4 |
12 5 | fn fun(a fn (int)) {}
13vlib/v/checker/tests/fn_args.vv:5:8: notice: unused parameter: `a`
14 3 | fn arr(a []int) {}
15 4 |
16 5 | fn fun(a fn (int)) {}
17 | ^
18 6 |
19 7 | fn basic() {
20vlib/v/checker/tests/fn_args.vv:18:6: notice: unused parameter: `p`
21 16 | }
22 17 |
23 18 | fn f(p &S1) {}
24 | ^
25 19 |
26 20 | fn ptr() {
27vlib/v/checker/tests/fn_args.vv:9:6: error: cannot use `&int` as `u8` in argument 1 to `uu8`
28 7 | fn basic() {
29 8 | v := 4
30 9 | uu8(&v)
31 | ~~
32 10 | arr([5.0]!)
33 11 | fun(fn (i &int) {})
34vlib/v/checker/tests/fn_args.vv:10:6: error: cannot use `[1]f64` as `[]int` in argument 1 to `arr`
35 8 | v := 4
36 9 | uu8(&v)
37 10 | arr([5.0]!)
38 | ~~~~~~
39 11 | fun(fn (i &int) {})
40 12 | fun(fn (ii ...int) {})
41vlib/v/checker/tests/fn_args.vv:11:6: error: cannot use `fn (&int)` as `fn (int)` in argument 1 to `fun`
42 9 | uu8(&v)
43 10 | arr([5.0]!)
44 11 | fun(fn (i &int) {})
45 | ~~~~~~~~~~~~~~
46 12 | fun(fn (ii ...int) {})
47 13 | }
48Details: expected argument 1 to be NOT a pointer, but the passed argument 1 is a pointer
49vlib/v/checker/tests/fn_args.vv:12:6: error: cannot use `fn (...int)` as `fn (int)` in argument 1 to `fun`
50 10 | arr([5.0]!)
51 11 | fun(fn (i &int) {})
52 12 | fun(fn (ii ...int) {})
53 | ~~~~~~~~~~~~~~~~~
54 13 | }
55 14 |
56vlib/v/checker/tests/fn_args.vv:22:4: error: cannot use `int` as `&S1` in argument 1 to `f`
57 20 | fn ptr() {
58 21 | v := 4
59 22 | f(v)
60 | ^
61 23 | }
62