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 / ng / front / cases / nom_layout_short_refuse.om
| 1 | note Layout view over a buffer shorter than the layout: omc refuses at compile time (error 7). The buffer's |
| 2 | note length is known, so the call is rejected before any field is read. |
| 3 | om2 |
| 4 | layout lo 8 |
| 5 | field a uint at 0 little |
| 6 | field b uint at 4 little |
| 7 | end |
| 8 | fn rd c view lo to uint |
| 9 | ret get c b |
| 10 | end |
| 11 | fn main to int |
| 12 | c = new uchar 6 1 |
| 13 | r = rd c |
| 14 | ret int ulong r |
| 15 | end |