v2 / vlib / v / checker / tests / c_fn_surplus_args.vv
19 lines · 17 sloc · 256 bytes · 757929392e0e7a75fc1272116460981e589737d5
Raw
1fn C.no() // untyped
2fn C.y1(int)
3fn C.ret() u8
4
5fn main() {
6 C.no(1) // allowed
7 C.y1()
8 C.y1(1) // ok
9 C.y1(1, 2)
10 C.ret() // ok
11 C.ret(1)
12 // avoid cgen whilst warning, later above should error
13 main()
14 C.af() // ok
15 C.af(3)
16}
17
18@[trusted]
19fn C.af() int
20