add noreturn and unreachable

This commit is contained in:
2026-07-22 00:27:13 +02:00
parent 402871ef7a
commit 17508ff751
21 changed files with 286673 additions and 279245 deletions
+6
View File
@@ -949,6 +949,12 @@
47. rename optional `none` to `null` (implemented)
48. add `noreturn` and `unreachable` (implemented)
- `noreturn` is the native bottom type, permitted as a function result but rejected for storage,
parameters, record fields, and the C ABI
- `noreturn` expressions coerce to any expected value type and terminate path analysis
- `unreachable` always traps at runtime and reports an error during comptime evaluation
## A word on unchecked casts
For casts that bypass safety checks, Honey provides builtin functions: