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 / seed / ng / front / cases / nom_struct_put_idx_trap.om

14 lines · 333 bytes Raw Blame History
1note Struct put: value and index are both bad (the value adds past the maximum, the index is past the field).
2note omc traps 3 (exit 103): the index is checked before the value is computed.
3struct H v uint 4 end
4fn big to uint
5ret 4294967295
6end
7fn five to ulong
8ret 4
9end
10fn main to int
11h = new H 1
12put h v five add big 1
13ret 0
14end