compiler: disallow callconv etc from depending on function parameters

Resolves: #22261
This commit is contained in:
mlugg
2024-12-18 04:01:38 +00:00
parent 242bb44695
commit 7408679234
10 changed files with 327 additions and 849 deletions

View File

@@ -1,13 +1,9 @@
fn foo(...) void {}
fn bar(a: anytype, ...) callconv(a) void {}
inline fn foo2(...) void {}
comptime {
_ = foo;
}
comptime {
_ = bar;
}
comptime {
_ = foo2;
}
@@ -19,4 +15,3 @@ comptime {
// :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