Add the error_values feature and error.const through specification, AIR, verification, interpretation and source lowering. Error values are Copy data with no allocation, effects or authority. Keep enum.make semantics frozen. Cover all registered tags, feature negotiation, payload/type errors and authority rejection in AIR/source; verify canonical and hosted CLI behavior. Record reference-bundle costs and the map preflight-validation prerequisite.
13 lines
304 B
LLVM
13 lines
304 B
LLVM
; expect: reject E1001
|
|
; phase: 6
|
|
; spec: docs/spec/05-effects-and-capabilities.md §14
|
|
module test.errors
|
|
air 0
|
|
lang 0.1
|
|
features [capabilities, effects, error_values, heap, ownership, resources]
|
|
fn @main() -> cap<mem.alloc>
|
|
effects []
|
|
entry:
|
|
%e = error.const alloc_error.budget_exceeded
|
|
ret %e
|