| 1 | const E = enum(noreturn) {}; |
| 2 | |
| 3 | export fn entry1() void { |
| 4 | const e: E = @fromBackingInt(undefined); |
| 5 | _ = e; |
| 6 | } |
| 7 | |
| 8 | export fn entry2() void { |
| 9 | const e: E = @fromBackingInt(0); |
| 10 | _ = e; |
| 11 | } |
| 12 | |
| 13 | // error |
| 14 | // |
| 15 | // :4:34: error: expected type 'noreturn', found '@TypeOf(undefined)' |
| 16 | // :4:34: note: cannot coerce to uninstantiable type 'noreturn' |
| 17 | // :9:34: error: expected type 'noreturn', found 'comptime_int' |
| 18 | // :9:34: note: cannot coerce to uninstantiable type 'noreturn' |