add noreturn and unreachable
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user