cli: add recoverable endian APIs and qualified std enums

This commit is contained in:
dev committed 2026-10-06 15:12:55 +03:00
1 parent 10a370471b
commit a2ca293506
45 files changed
+1205 -89

No files matched your search

@@ -0,0 +1,15 @@
// expect: reject E7005
// phase: 6
// spec: docs/spec/16-standard-library.md §2.3; docs/spec/15-source-language.md §13
module test.endian
import std.bytes;
enum ReadU16 { ok(u16), short_input }
fn main() -> u8
effects []
{
match std.bytes.read_u16_le(b"xx") {
ReadU16::ok(value) => { return 0; }
ReadU16::short_input => { return 1; }
}
}