-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior
Description
Zig Version
0.15.2
Steps to Reproduce and Observed Behavior
const TestEnum = enum {
a,
b,
pub fn format(self: @This(), writer: *std.io.Writer) !void {
try writer.writeAll(@tagName(self));
}
};
test {
try std.testing.expectEqualDeep(TestEnum.b, TestEnum.b);
}Compiling fails with the following error:
error: ambiguous format string; specify {f} to call format method, or {any} to skip it
@compileError("ambiguous format string; specify {f} to call format method, or {any} to skip it");
Expected Behavior
No compiler errors.
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior