From ee4ced96833470f9432e6a5dc5b31534457280c0 Mon Sep 17 00:00:00 2001 From: r00ster91 Date: Tue, 4 Jul 2023 10:34:31 -0400 Subject: 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. --- test/cases/compile_errors/call_optional_function.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/cases/compile_errors/call_optional_function.zig') diff --git a/test/cases/compile_errors/call_optional_function.zig b/test/cases/compile_errors/call_optional_function.zig index ce8c3a4d23..40ae176bb0 100644 --- a/test/cases/compile_errors/call_optional_function.zig +++ b/test/cases/compile_errors/call_optional_function.zig @@ -11,7 +11,7 @@ pub export fn entry2() void { // backend=stage2 // target=native // -// :3:9: error: cannot call optional type '?fn() void' +// :3:9: error: cannot call optional type '?fn () void' // :3:9: note: consider using '.?', 'orelse' or 'if' -// :7:9: error: cannot call optional type '?*const fn() void' +// :7:9: error: cannot call optional type '?*const fn () void' // :7:9: note: consider using '.?', 'orelse' or 'if' -- cgit v1.2.3