packInt and getIntSize both end their signed and unsigned branches with a @compileError that itself does not compile:
@compileError("Unsupported signed int with " ++ type_info.int.bits ++ "bits");
type_info.int.bits is a u16, and ++ needs indexable operands, so the concatenation fails before the message is ever produced. Asking for an unsupported width gives:
src/int.zig:99:70: error: expected indexable; found 'u16'
@compileError("Unsupported signed int with " ++ type_info.int.bits ++ "bits");
~~~~~~~~~~~~~^~~~~
instead of the intended "Unsupported signed int with 96 bits". Reproduces with packInt(&w, i96, 1).
Four sites: the signed and unsigned branches of packInt, and the same two in getIntSize. std.fmt.comptimePrint produces the message properly. There is also a missing space before bits in the intended text.
Never surfaced because nothing instantiates these functions with an unsupported width — the same reason #21, #22 and the stale .Slice in #23 stayed hidden.
Worth noting what this blocks in practice: std.Io.Timestamp and std.Io.Duration are both struct { nanoseconds: i96 }, so encoding either one lands exactly here. A clear error message would at least make that legible. (Supporting them is a separate question — msgpack integers stop at 64 bits, so i96 cannot round-trip in general, and the timestamp extension would be the real answer for Timestamp.)
packIntandgetIntSizeboth end their signed and unsigned branches with a@compileErrorthat itself does not compile:type_info.int.bitsis au16, and++needs indexable operands, so the concatenation fails before the message is ever produced. Asking for an unsupported width gives:instead of the intended "Unsupported signed int with 96 bits". Reproduces with
packInt(&w, i96, 1).Four sites: the signed and unsigned branches of
packInt, and the same two ingetIntSize.std.fmt.comptimePrintproduces the message properly. There is also a missing space beforebitsin the intended text.Never surfaced because nothing instantiates these functions with an unsupported width — the same reason #21, #22 and the stale
.Slicein #23 stayed hidden.Worth noting what this blocks in practice:
std.Io.Timestampandstd.Io.Durationare bothstruct { nanoseconds: i96 }, so encoding either one lands exactly here. A clear error message would at least make that legible. (Supporting them is a separate question — msgpack integers stop at 64 bits, soi96cannot round-trip in general, and the timestamp extension would be the real answer forTimestamp.)