interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / tests / compiler / neg / ma_call_mut_and_shared.osc

7 lines · 212 bytes Raw Blame History
1// expect: MUTABLE_ALIAS object=a line=6
2// transition: borrow_shared while borrow_mut live
3fn g(x: &mut [i32; 3], y: &[i32; 3]) { x[0] = y[1]; }
4fn f() {
5 let a: own [i32; 3] = alloc(0);
6 g(&mut a, &a);
7}