| 1 | const E = enum(u8) { |
| 2 | a = undefined, |
| 3 | b, |
| 4 | }; |
| 5 | const U = union(enum(u8)) { |
| 6 | a: u32 = undefined, |
| 7 | b, |
| 8 | }; |
| 9 | comptime { |
| 10 | _ = E.a; |
| 11 | } |
| 12 | comptime { |
| 13 | _ = U.a; |
| 14 | } |
| 15 | |
| 16 | // error |
| 17 | // |
| 18 | // :2:9: error: use of undefined value here causes illegal behavior |
| 19 | // :6:14: error: use of undefined value here causes illegal behavior |