zig/test/cases/compile_errors/invalid_tail_call.zig
r00ster91 ee4ced9683 write function types consistently with a space before fn keyword
Currently, the compiler (like @typeName) writes it `fn(...) Type` but
zig fmt writes it `fn (...) Type` (notice the space after `fn`).
This inconsistency is now resolved and function types are consistently
written the zig fmt way. Before this there were more `fn (...) Type`
occurrences than `fn(...) Type` already.
2023-09-19 15:15:05 +03:00

12 lines
312 B
Zig

fn myFn(_: usize) void {
return;
}
pub export fn entry() void {
@call(.always_tail, myFn, .{0});
}
// error
// backend=llvm
// target=native
//
// :5:5: error: unable to perform tail call: type of function being called 'fn (usize) void' does not match type of calling function 'fn () callconv(.C) void'