Support optional length parameter on struct tags for multi-pointers

This commit is contained in:
gingerBill
2022-06-11 01:40:58 +01:00
parent 6ed5cbee12
commit c166b6a21d

View File

@@ -1709,6 +1709,11 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
elem := runtime.type_info_base(info.elem)
if elem != nil {
if n, ok := fi.optional_len.?; ok {
fmt_array(fi, ptr, n, elem.size, elem, verb)
return
}
#partial switch e in elem.variant {
case runtime.Type_Info_Array,
runtime.Type_Info_Slice,