aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/invalid_variadic_function.zig
blob: 997db9fee8fadbdac1d8ff6b845f561e52dd4fa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
fn foo(...) void {}
fn bar(a: anytype, ...) callconv(a) void {}

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

// error
// backend=stage2
// target=native
//
// :1:1: error: variadic function must have 'C' calling convention
// :2:1: error: generic function cannot be variadic