cli: validate inferred allocation content before AIR

This commit is contained in:
dev committed 2026-10-08 10:31:10 +03:00
1 parent 1bbfed24a8
commit bc5412dadd
67 files changed
+607 -8

No files matched your search

@@ -0,0 +1,12 @@
// expect: run
// result: 42
// grant: heap=mem.alloc:128
// phase: 6
// spec: docs/spec/15-source-language.md §10/§16; docs/spec/03-memory-model.md §25
module test.inferred_content
fn main(heap: cap<mem.alloc>) -> u64 effects [mem.alloc] {
let graph = island.create(42u64, heap) or trap;
var answer: u64 = 0;
{ ref g = graph; let root = island.root(g); let p = own.new(root, heap) or trap; let again = own.take(move p); ref value = island.at(g, again); answer = *value; }
island.destroy(move graph); return answer;
}