diff --git a/sysdata/libraries/stn/src/formatters.hb b/sysdata/libraries/stn/src/formatters.hb index cfc418968..c60d2a794 100644 --- a/sysdata/libraries/stn/src/formatters.hb +++ b/sysdata/libraries/stn/src/formatters.hb @@ -90,7 +90,7 @@ format_inner := fn($T: type, v: T, str: ^u8, opts: FormatOptions): uint { return @inline(format_bool, v, str) } else if float(T) { return @inline(format_float, T, v, str, opts.decimal_digits) - } else { + } else if !primitive(T) { i := 0 // name := @nameof(T) // len := string.length(name) @@ -112,8 +112,9 @@ format_inner := fn($T: type, v: T, str: ^u8, opts: FormatOptions): uint { i += 1 } return len + } else { + panic("Unsupported formatter type\0") } - panic("Unsupported formatter type\0") } /* TODO: