You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
zig fmt: wrong output for empty tagged containers with document comments #23754
This applies to packed struct(T), union(T), union(enum(T)), and enum(T)
This happens since Ast.lastToken assumes that when these have no members, the only following tokens are ){}. This also means the bug may also observable in other parts of the compiler, but it is easiest to observe with zig fmt.
changed the title [-]zig fmt: wrong output for empty containers with document comments[/-][+]zig fmt: wrong output for tagged empty containers with document comments[/+]on May 4, 2025
changed the title [-]zig fmt: wrong output for tagged empty containers with document comments[/-][+]zig fmt: wrong output for empty tagged containers with document comments[/+]on Jun 10, 2025
Activity
[-]zig fmt: wrong output for empty containers with document comments[/-][+]zig fmt: wrong output for tagged empty containers with document comments[/+]add fuzz test for zig fmt
[-]zig fmt: wrong output for tagged empty containers with document comments[/-][+]zig fmt: wrong output for empty tagged containers with document comments[/+]add fuzz test for zig fmt
add fuzz test for zig fmt