v/vlib/v/checker/tests/fn_args.out

36 lines
1.2 KiB
Plaintext

vlib/v/checker/tests/fn_args.vv:9:6: error: cannot use `&int` as `u8` in argument 1 to `uu8`
7 | fn basic() {
8 | v := 4
9 | uu8(&v)
| ~~
10 | arr([5]!)
11 | fun(fn (i &int) {})
vlib/v/checker/tests/fn_args.vv:10:6: error: cannot use `[1]int` as `[]int` in argument 1 to `arr`
8 | v := 4
9 | uu8(&v)
10 | arr([5]!)
| ~~~~
11 | fun(fn (i &int) {})
12 | fun(fn (ii ...int) {})
vlib/v/checker/tests/fn_args.vv:11:6: error: cannot use `fn (&int)` as `fn (int)` in argument 1 to `fun`
9 | uu8(&v)
10 | arr([5]!)
11 | fun(fn (i &int) {})
| ~~~~~~~~~~~~~~
12 | fun(fn (ii ...int) {})
13 | }
Details: ``'s expected fn argument: `` is NOT a pointer, but the passed fn argument: `i` is a pointer
vlib/v/checker/tests/fn_args.vv:12:6: error: cannot use `fn (...int)` as `fn (int)` in argument 1 to `fun`
10 | arr([5]!)
11 | fun(fn (i &int) {})
12 | fun(fn (ii ...int) {})
| ~~~~~~~~~~~~~~~~~
13 | }
14 |
vlib/v/checker/tests/fn_args.vv:22:4: error: cannot use `int` as `&S1` in argument 1 to `f`
20 | fn ptr() {
21 | v := 4
22 | f(v)
| ^
23 | }