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 / redefined_shadow.osc
| 1 | // expect: REDEFINED_NAME object=x line=6 |
| 2 | // shadowing in an inner scope is refused. |
| 3 | fn 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 | } |