Files
aji/tests/conformance/phase4/reject/arc_content_mutex.air
T
dev 7cc23338e2 Phase 4 exit review; AIR twins for the .aji-only island rejects
New AIR rejects: island_use_after_send (E2001), island_lend_task (E4002),
island_destroy_while_borrowed (E2101), arc_content_mutex (E2111),
frozen_borrow_mut (E1001). Every Phase 4 invariant now has an AIR and an
.aji test. Full suite 392/392, also under --stress 1000 and
--collect-every-step; test-extended, hosted smoke, source coverage 61/61.
2026-10-05 22:22:58 +03:00

21 lines
543 B
LLVM

; An arc holds only ArcSafe values: a mutex is Share but not ArcSafe (E2111).
; expect: reject E2111
; phase: 4
; spec: docs/spec/03-memory-model.md
module test.arc_content_mutex
air 0
lang 0.1
features [arc, cancellation, capabilities, effects, heap, islands, ownership, resources, sync, tasks]
fn @main(%heap: cap<mem.alloc>) -> u64
effects [mem.alloc]
entry:
%v = const.u64 1
%m = mutex.make %v
arc.new %m, %heap, ok -> @made, err -> @oom
made(%a: arc<mutex<u64>>):
arc.release %a
ret %v
oom(%e: alloc_error):
trap