Gitly
English
Русский
Español
日本語
中文
Português
Pricing
Log in
Register
v2
/
vlib
/
v
/
checker
/
tests
/
c_fn_surplus_args.vv
19
lines
·
17
sloc
·
256 bytes
·
757929392e0e7a75fc1272116460981e589737d5
Raw
1
fn C.no() // untyped
2
fn C.y1(int)
3
fn C.ret() u8
4
5
fn 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]
19
fn C.af() int
20