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 / seed / omc / tests / struct-bool / init_false.om
| 1 | note init_false.om: a bool field set false by new reads back false; true would take the first branch. |
| 2 | struct W a uint f bool end |
| 3 | fn main to uint |
| 4 | w = new W 5 false |
| 5 | if eq get w f true |
| 6 | ret 1 |
| 7 | end |
| 8 | if eq get w f false |
| 9 | ret add get w a 20 |
| 10 | end |
| 11 | ret 2 |
| 12 | end |