diff options
| author | r00ster91 <r00ster91@proton.me> | 2023-07-08 18:05:03 -0400 |
|---|---|---|
| committer | r00ster91 <r00ster91@proton.me> | 2023-07-08 18:05:03 -0400 |
| commit | 026c63d8fe5caa30d003230b5514d8a3e274f82c (patch) | |
| tree | 3d127b588a4a1e92337e75d432d754f8e8ccad1b /test/cases/compile_errors/invalid_variadic_function.zig | |
| parent | 9be1a3f7ef9177fd1d495ae1f85d53693f6c6dcf (diff) | |
| download | zig-026c63d8fe5caa30d003230b5514d8a3e274f82c.tar.gz zig-026c63d8fe5caa30d003230b5514d8a3e274f82c.zip | |
Sema: infrastructure for supporting more than .C callconv for variadic functions
Now you can add new calling conventions that you confirmed to work with
variadic functions simply in a single place and the rest will work
automatically.
Diffstat (limited to 'test/cases/compile_errors/invalid_variadic_function.zig')
| -rw-r--r-- | test/cases/compile_errors/invalid_variadic_function.zig | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/cases/compile_errors/invalid_variadic_function.zig b/test/cases/compile_errors/invalid_variadic_function.zig index 7652cb329a..d0b6d2c8f5 100644 --- a/test/cases/compile_errors/invalid_variadic_function.zig +++ b/test/cases/compile_errors/invalid_variadic_function.zig @@ -1,5 +1,6 @@ fn foo(...) void {} fn bar(a: anytype, ...) callconv(a) void {} +inline fn foo2(...) void {} comptime { _ = foo; @@ -7,10 +8,16 @@ comptime { comptime { _ = bar; } +comptime { + _ = foo2; +} // error // backend=stage2 // target=native // -// :1:1: error: variadic function must have 'C' calling convention +// :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' |
