feat(value,ir): ref.ambiguous error, exact conversion helpers and mixed builtin calls
- value: add ErrorCategory::RefAmbiguous (code ref.ambiguous) for the S-07 rule that a reference matching several resources must never silently pick the first one; re-export float/integer conversion helpers at the crate root. - ir/builtins: math/foreign calls accept positional arguments followed by named ones (matching the documented examples) instead of being named-only; arity and unknown-name validation still apply. - tests updated for the new builtin call shape.
This commit is contained in:
1 parent
8003907f4e
commit
46c9ca2fd3
3 files changed
+18
-10
No files matched your search
@@ -35,6 +35,9 @@ pub enum ErrorCategory {
|
||||
MathUnsupported,
|
||||
/// Plugin ABI negotiation failed.
|
||||
PluginAbi,
|
||||
/// A resource reference matches more than one resource (S-07: never pick
|
||||
/// the first silently).
|
||||
RefAmbiguous,
|
||||
/// A plugin reported an execution failure.
|
||||
PluginFailure,
|
||||
/// A foreign kernel failed (non-zero exit, protocol violation).
|
||||
@@ -62,6 +65,7 @@ impl ErrorCategory {
|
||||
ErrorCategory::KernelUnavailable => codes::KERNEL_UNAVAILABLE,
|
||||
ErrorCategory::MathUnsupported => codes::MATH_UNSUPPORTED,
|
||||
ErrorCategory::PluginAbi => codes::PLUGIN_ABI_MISMATCH,
|
||||
ErrorCategory::RefAmbiguous => "ref.ambiguous",
|
||||
ErrorCategory::PluginFailure => "plugin.failure",
|
||||
ErrorCategory::ForeignFailure => "foreign.failure",
|
||||
ErrorCategory::HostError => "host.error",
|
||||
|
||||
Reference in new issue
Block a user