Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/tests/compiler/progs/df_else.osc # 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 Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / tests / compiler / progs / df_else.osc` 18 lines ยท 447 bytes Raw Blame History 1 // entry: f 2 // OSC-3 item 3 (drop flags): a struct owner moved in the else-branch only 3 // (by a let-move into a branch-local owner, released at the branch end). 4 struct P { x: u32, y: u32 } 5 6 fn f(k: u32) -> u32 { 7 let p: own P = P { x: k & 255, y: 3 }; 8 let mut r: u32 = 1; 9 if k < 10 { 10 r = r + p.x; 11 } else { 12 let q: own P = p; 13 r = q.y * 2; 14 } 15 return r; 16 } 17 // expect-run: f 4 -> 5 18 // expect-run: f 12 -> 6