Problem
The checked examples and the built-in assert!, debug_assert!, todo!, unimplemented!, and unreachable! macros expand to panic(message), but panic is not registered in the type environment and has no native lowering. Current home check examples/ therefore reports Undefined function 'panic' across five example files.
Scope
- Register
panic: fn(string) -> neverin the checker. - Preserve bottom-type behavior so panic branches satisfy surrounding expression types.
- Lower source-level panic on supported native backends by writing the message to stderr and terminating with exit code 101.
- Add focused checker and executable regressions.
- Re-run
scripts/check-examples.shand report the remaining independent failures.
Acceptance criteria
panicrequires exactly one string argument and has typenever.- A panic branch type-checks where another branch returns a concrete value.
- Native panic prints its message and exits 101.
- Macro-expanded panic calls no longer fail as undefined functions.