mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-05-09 10:00:19 -04:00
213c4fc25f
In preparation for its removal, as accepted in https://github.com/ziglang/zig/issues/1593.
15 lines
282 B
Zig
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'
|