lib/encoding/utf8+test: add strerror per Hare
This commit is contained in:
@@ -29,6 +29,12 @@ export type more = void;
|
||||
// ref/hare/encoding/utf8/types.ha:9 — invalid UTF-8 sequence.
|
||||
export type invalid = !void;
|
||||
|
||||
// ref/hare/encoding/utf8/types.ha:12 — fixed message; `invalid` carries
|
||||
// no payload, so the rendering is constant.
|
||||
export fn strerror(err: invalid) str = {
|
||||
return "Invalid UTF-8";
|
||||
};
|
||||
|
||||
// `done` is not a built-in singleton in ww (Hare ships it as part of
|
||||
// the type system). Plain `void` (not `!void`): end-of-input is a
|
||||
// continuation signal, not an error. lib/io spells its EOF the same
|
||||
|
||||
Reference in New Issue
Block a user