Files
zig/test/cases/compile_errors/zero_width_nonexhaustive_enum.zig
Matthew Lugg 213c4fc25f lib,test: remove uses of i0
In preparation for its removal, as accepted in
https://github.com/ziglang/zig/issues/1593.
2026-04-30 08:57:51 +01:00

15 lines
282 B
Zig

comptime {
const E = enum(u0) { a, _ };
_ = @as(E, undefined);
}
comptime {
const E = enum(u0) { a, b, _ };
_ = @as(E, undefined);
}
// error
//
// :2:15: error: non-exhaustive enum specifies every value
// :7:29: error: enum tag value '1' too large for type 'u0'