zig/test/cases/compile_errors/invalid_variadic_function.zig
mlugg 4be0cf30fc
test: update for CallingConvention changes
This also includes some compiler and std changes to correct error
messages which weren't properly updated before.
2024-10-19 19:15:23 +01:00

22 lines
564 B
Zig

fn foo(...) void {}
fn bar(a: anytype, ...) callconv(a) void {}
inline fn foo2(...) void {}
comptime {
_ = foo;
}
comptime {
_ = bar;
}
comptime {
_ = foo2;
}
// error
// target=x86_64-linux
//
// :1:1: error: variadic function does not support 'auto' calling convention
// :1:1: note: supported calling conventions: 'x86_64_sysv', 'x86_64_win'
// :1:1: error: variadic function does not support 'inline' calling convention
// :1:1: note: supported calling conventions: 'x86_64_sysv', 'x86_64_win'
// :2:1: error: generic function cannot be variadic