aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/invalid_variadic_function.zig
blob: ee8fc3439e854ccf0efaadd9813107c7f3e1408e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
fn foo(...) void {}
fn bar(a: anytype, ...) callconv(a) void {}
inline fn foo2(...) void {}

comptime {
    _ = foo;
}
comptime {
    _ = bar;
}
comptime {
    _ = foo2;
}

// error
// backend=stage2
// target=native
//
// :1:1: error: variadic function does not support '.Unspecified' calling convention
// :1:1: note: supported calling conventions: '.C'
// :1:1: error: variadic function does not support '.Inline' calling convention
// :1:1: note: supported calling conventions: '.C'
// :2:1: error: generic function cannot be variadic