| 1 | fn foo(comptime x: i32) i32 { |
| 2 | comptime { |
| 3 | if (x >= 0) return -x; |
| 4 | unreachable; |
| 5 | } |
| 6 | } |
| 7 | export fn entry() void { |
| 8 | _ = comptime foo(-42); |
| 9 | } |
| 10 | |
| 11 | // error |
| 12 | // |
| 13 | // :4:9: error: reached unreachable code |
| 14 | // :8:21: note: called at comptime here |