| 1 | comptime { |
| 2 | const E = enum(u0) { a, _ }; |
| 3 | _ = @as(E, undefined); |
| 4 | } |
| 5 | |
| 6 | comptime { |
| 7 | const E = enum(u0) { a, b, _ }; |
| 8 | _ = @as(E, undefined); |
| 9 | } |
| 10 | |
| 11 | // error |
| 12 | // |
| 13 | // :2:15: error: non-exhaustive enum specifies every value |
| 14 | // :7:29: error: enum tag value '1' too large for type 'u0' |