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
omega-mv / tests / compiler / neg / ma_one_reborrow_still_live.osc
| 1 | // expect: MUTABLE_ALIAS object=r line=9 |
| 2 | // transition: write while reborrowed |
| 3 | fn f() -> i32 { |
| 4 | let a: own [i32; 1] = alloc(7); |
| 5 | let r: &mut [i32; 1] = &mut a; |
| 6 | let first: &[i32; 1] = &r; |
| 7 | { let second: &[i32; 1] = &r; let seen: i32 = second[0]; } |
| 8 | |
| 9 | r[0] = 9; |
| 10 | return first[0]; |
| 11 | } |