Files
zig/test/cases/compile_errors/invalid_extern_function_call.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

17 lines
343 B
Zig

const x = @extern(*const fn () callconv(.c) void, .{ .name = "foo" });
export fn entry0() void {
comptime x();
}
export fn entry1() void {
@call(.always_inline, x, .{});
}
// error
// backend=stage2
// target=native
//
// :4:15: error: comptime call of extern function pointer
// :8:5: error: inline call of extern function pointer