[fmt] Add bit fields to the pointer printing logic

core:fmt prints pointers to structs as `&StructName{ ... }` but `bit_field`s are currently printed
the same as rawptrs (`0xAABBCCDDEEFF` only).

This commit changes that so they behave the same as structs and unions.
This commit is contained in:
Tetralux
2024-08-12 16:24:01 +00:00
parent b71e0c2e36
commit 4f56822204

View File

@@ -2728,7 +2728,8 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
}
case runtime.Type_Info_Struct,
runtime.Type_Info_Union:
runtime.Type_Info_Union,
runtime.Type_Info_Bit_Field:
if ptr == nil {
io.write_string(fi.writer, "<nil>", &fi.n)
return