cli: validate inferred allocation content before AIR
This commit is contained in:
1 parent
1bbfed24a8
commit
bc5412dadd
67 files changed
+607
-8
No files matched your search
@@ -405,6 +405,7 @@ A byte string or array used where a `slice<u8>` is expected is materialized in f
|
||||
- the element rules of channels and mutexes (no borrow, scope, task, shield or guard).
|
||||
- Copy content of `own_array<T>` and the repeated value of `own.array`; an invalid content type is E7005 at that annotation/value, with `constraint: Copy` and `type_constructor: own_array`. Known linear content in unused generic signatures and static contracts MUST reject; unknown type parameters are checked after substitution.
|
||||
- Inferred array literal elements MUST satisfy the existing member-position rules. Borrowed elements reject E7006 `invalid_literal`; other invalid constructors reject E7005 at the element with `position: member` and `type_constructor`. Lists preserve explicit linear transfers; repetitions MUST satisfy Copy.
|
||||
- Inferred content of `own.new`, `own.pack`, `region.new`, `region.array`, `mutex.make`, `island.create`, `island.alloc` and `arc.new` MUST be a value: `void`/`never` reject E7005 at the content argument, with `position: member` and `type_constructor`. `own.new` and region storage MUST require Copy (E7005 with `constraint: Copy` and `operation`); `own.pack` MUST reject borrowed content (E7005 with `position: member` and `type_constructor`) while preserving complete linear transfers and failure recovery. These checks follow ordinary explicit-move checks and precede allocation authority checks. Graph-content properties, reserved transfers and concurrency checks otherwise retain their verifier diagnostics; `own.array` retains its Copy diagnostic above.
|
||||
|
||||
Source type annotations MUST satisfy the existing AIR type-position rules (spec 07 §8.3/§8.8), including nested constructors. An invalid constructor is E7005 at its annotation, with `position` and `type_constructor` fields. Known constructors in unused generic signatures and static function contracts MUST be checked; restrictions depending on a type parameter are checked after substitution. Graph-content properties and feature gates for otherwise correctly positioned types retain their verifier diagnostics.
|
||||
|
||||
|
||||
Reference in new issue
Block a user