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 / redefined_shadow.osc

10 lines · 206 bytes Raw Blame History
1// expect: REDEFINED_NAME object=x line=6
2// shadowing in an inner scope is refused.
3fn f(a: i32) -> i32 {
4 let x: i32 = a;
5 if a > 0 {
6 let x: i32 = 2;
7 return x;
8 }
9 return x;
10}