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 arena = region.create(heap) or trap;
var answer: u64 = 0;
{ ref r = arena; let p = region.new(r, 20u64) or trap; let a = region.array(r, 2usize, 11u64) or trap; answer = *p + a[0] + a[1]; }
region.destroy(move arena); return answer;
}