2021-05-04 09:33:24 +00:00
|
|
|
vlib/v/checker/tests/fn_args.vv:9:6: error: cannot use `&int` as `byte` in argument 1 to `uu8`
|
|
|
|
7 | fn basic() {
|
|
|
|
8 | v := 4
|
|
|
|
9 | uu8(&v)
|
2021-04-15 03:51:48 +00:00
|
|
|
| ~~
|
2021-05-04 09:33:24 +00:00
|
|
|
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]!)
|
2021-02-19 12:14:40 +00:00
|
|
|
| ~~~~
|
2021-05-04 09:33:24 +00:00
|
|
|
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 | }
|
2021-01-30 08:20:09 +00:00
|
|
|
Details: ``'s expected fn argument: `` is NOT a pointer, but the passed fn argument: `i` is a pointer
|
2021-05-04 09:33:24 +00:00
|
|
|
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)
|
2021-02-19 12:14:40 +00:00
|
|
|
| ^
|
2021-05-04 09:33:24 +00:00
|
|
|
23 | }
|