v2 / vlib / v / checker / tests / c_fn_surplus_args.out
52 lines · 52 sloc · 1.58 KB · fc72044b42db341e64f1f43dc4c06e7c7ce31c44
Raw
1vlib/v/checker/tests/c_fn_surplus_args.vv:6:7: error: expected 0 arguments, but got 1
2 4 |
3 5 | fn main() {
4 6 | C.no(1) // allowed
5 | ^
6 7 | C.y1()
7 8 | C.y1(1) // ok
8Details: have (int literal)
9 want ()
10vlib/v/checker/tests/c_fn_surplus_args.vv:7:4: error: expected 1 argument, but got 0
11 5 | fn main() {
12 6 | C.no(1) // allowed
13 7 | C.y1()
14 | ~~~~
15 8 | C.y1(1) // ok
16 9 | C.y1(1, 2)
17Details: have ()
18 want (int)
19vlib/v/checker/tests/c_fn_surplus_args.vv:9:10: error: expected 1 argument, but got 2
20 7 | C.y1()
21 8 | C.y1(1) // ok
22 9 | C.y1(1, 2)
23 | ^
24 10 | C.ret() // ok
25 11 | C.ret(1)
26Details: have (int literal, int literal)
27 want (int)
28vlib/v/checker/tests/c_fn_surplus_args.vv:11:8: error: expected 0 arguments, but got 1
29 9 | C.y1(1, 2)
30 10 | C.ret() // ok
31 11 | C.ret(1)
32 | ^
33 12 | // avoid cgen whilst warning, later above should error
34 13 | main()
35Details: have (int literal)
36 want ()
37vlib/v/checker/tests/c_fn_surplus_args.vv:13:2: error: the `main` function cannot be called in the program
38 11 | C.ret(1)
39 12 | // avoid cgen whilst warning, later above should error
40 13 | main()
41 | ~~~~~~
42 14 | C.af() // ok
43 15 | C.af(3)
44vlib/v/checker/tests/c_fn_surplus_args.vv:15:7: error: expected 0 arguments, but got 1
45 13 | main()
46 14 | C.af() // ok
47 15 | C.af(3)
48 | ^
49 16 | }
50 17 |
51Details: have (int literal)
52 want ()
53