aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/invalid_variadic_function.zig
blob: d0b6d2c8f5e9a906c49b4994be06979e9de28ada (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'
// :2:1: error: generic function cannot be variadic
// :1:1: error: variadic function does not support '.Inline' calling convention
// :1:1: note: supported calling conventions: '.C'