tests: audit buffer and error-value rejection twins

This commit is contained in:
dev committed 2026-10-08 21:21:42 +03:00
1 parent 2742867ef7
commit 5371eb7a2f
14 files changed
+273 -17

No files matched your search

+154
View File
@@ -895,6 +895,160 @@
"site": "instruction",
"spec": "docs/spec/06-resources-and-errors.md \u00a76.3",
"rule": "selected returns without consuming its owning parameter; source also invokes it through explicit specialization."
},
"buffers/reserve_missing_effect.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/15-source-language.md \u00a717",
"rule": "buffer.reserve requires explicit mem.alloc even when both outcomes trap."
},
"buffers/wrong_capability.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/15-source-language.md \u00a717",
"rule": "buffer.reserve is supplied cap<io.write> instead of the required cap<mem.alloc>."
},
"buffers/readonly_view_push.air": {
"kind": "same_code",
"site": "instruction",
"spec": "docs/spec/15-source-language.md \u00a717",
"rule": "buffer.push mutates a buffer while its shared buffer.view borrow is live, even when both outcomes trap.",
"required_ops": {
"borrow.ref": 1,
"buffer.view": 1,
"buffer.push": 1,
"const.u64": 1,
"trap": 2
},
"exact_ops": true,
"required_identity_uses": {
"conflicts_with": "buffer.view"
}
},
"error_values/no_authority.air": {
"kind": "source_error",
"spec": "docs/spec/15-source-language.md \u00a710",
"rule": "An error value cannot supply capability authority; the result type mismatch is source-decided E7005.",
"analogues": [
{
"source": "source/error_values/no_authority.aji",
"codes": [
"E7005"
],
"fields": {
"expected": "cap<mem.alloc>",
"found": "alloc_error"
}
}
]
},
"error_values/wrong_family.air": {
"kind": "source_error",
"spec": "docs/spec/15-source-language.md \u00a710",
"rule": "Returning alloc_error where io_error is declared rejects before AIR as E7005.",
"analogues": [
{
"source": "source/error_values/wrong_family.aji",
"codes": [
"E7005"
],
"fields": {
"expected": "io_error",
"found": "alloc_error"
}
}
]
},
"error_values/unknown_variant.air": {
"kind": "source_error",
"spec": "docs/spec/15-source-language.md \u00a76",
"rule": "An unknown built-in error variant is E7002 under the source error-construction rule.",
"analogues": [
{
"source": "source/error_values/unknown_variant.aji",
"codes": [
"E7002"
],
"fields": {
"enum": "alloc_error",
"variant": "invalid"
}
}
]
},
"error_values/payload.air": {
"kind": "source_error",
"spec": "docs/spec/15-source-language.md \u00a76",
"rule": "Built-in error variants reject payload arguments with E7005. This non-empty source payload is an analogue of the AIR empty argument list; empty source () instead rejects E7001.",
"analogues": [
{
"source": "source/error_values/payload.aji",
"codes": [
"E7005"
],
"fields": {
"variant": "budget_exceeded"
}
}
]
},
"buffers/borrowed_element.air": {
"kind": "source_error",
"spec": "docs/spec/15-source-language.md \u00a710",
"rule": "A borrowed buffer element violates member-position rules. AIR checks a parameter while this source analogue checks the buffer.new type argument, both before the operation.",
"analogues": [
{
"source": "source/buffers/borrowed_element.aji",
"codes": [
"E7005"
],
"fields": {
"position": "member",
"type_constructor": "ref"
}
}
]
},
"linear/borrow_array.air": {
"kind": "source_error",
"spec": "docs/spec/15-source-language.md \u00a710",
"rule": "Borrowed inferred array elements reject E7006 invalid_literal before AIR. The source list has two elements and AIR has one; element count does not decide this member-position rule.",
"analogues": [
{
"source": "source/array_literals/list_ref.aji",
"codes": [
"E7006"
],
"fields": {
"reason": "invalid_literal"
}
}
]
},
"buffers/undeclared.air": {
"kind": "air_only",
"spec": "docs/spec/15-source-language.md \u00a79",
"rule": "The missing AIR feature or dependency header cannot be authored in source: lowering generates the used features and their full dependency closure."
},
"linear/without_feature.air": {
"kind": "air_only",
"spec": "docs/spec/15-source-language.md \u00a79",
"rule": "The missing AIR feature or dependency header cannot be authored in source: lowering generates the used features and their full dependency closure."
},
"error_values/undeclared.air": {
"kind": "air_only",
"spec": "docs/spec/15-source-language.md \u00a79",
"rule": "The missing AIR feature or dependency header cannot be authored in source: lowering generates the used features and their full dependency closure."
},
"error_values/dependency.air": {
"kind": "air_only",
"spec": "docs/spec/15-source-language.md \u00a79",
"rule": "The missing AIR feature or dependency header cannot be authored in source: lowering generates the used features and their full dependency closure."
},
"phase0/reject/float_reserved.air": {
"kind": "air_only",
"spec": "docs/spec/15-source-language.md \u00a73",
"rule": "Source has no built-in f32/f64 type (spec 07 \u00a78.4). An undeclared f64 spelling is an ordinary E7002 unknown name; a user nominal f64 lowers to @f64 and cannot produce the reserved AIR primitive f64. Neither tests the reserved_type rule. Spec 15 \u00a71 restricts source to published features."
}
}
}