Fix special printing for certain named types with fmt.printf related procedures

This commit is contained in:
gingerBill
2023-05-24 20:54:30 +01:00
parent 54b7cefb09
commit 32ca50a097
+4 -12
View File
@@ -2647,18 +2647,10 @@ fmt_arg :: proc(fi: ^Info, arg: any, verb: rune) {
} }
} }
arg_info := type_info_of(arg.id)
custom_types: switch a in arg { if info, ok := arg_info.variant.(runtime.Type_Info_Named); ok {
case runtime.Source_Code_Location: fmt_named(fi, arg, verb, info)
if fi.hash && verb == 'v' { return
io.write_string(fi.writer, a.file_path, &fi.n)
io.write_byte(fi.writer, '(', &fi.n)
io.write_i64(fi.writer, i64(a.line), 10, &fi.n)
io.write_byte(fi.writer, ':', &fi.n)
io.write_i64(fi.writer, i64(a.column), 10, &fi.n)
io.write_byte(fi.writer, ')', &fi.n)
return
}
} }
base_arg := arg base_arg := arg