This commit is contained in:
gingerBill
2024-06-05 15:43:15 +01:00
parent c406bbb6e3
commit cbabcb0907
3 changed files with 34 additions and 2 deletions

View File

@@ -8866,6 +8866,10 @@ gb_internal void check_compound_literal_field_values(CheckerContext *c, Slice<As
case Type_Array:
ft = bt->Array.elem;
break;
case Type_BitField:
is_constant = false;
ft = bt->BitField.fields[index]->type;
break;
default:
GB_PANIC("invalid type: %s", type_to_string(ft));
break;
@@ -8892,6 +8896,9 @@ gb_internal void check_compound_literal_field_values(CheckerContext *c, Slice<As
case Type_Array:
nested_ft = bt->Array.elem;
break;
case Type_BitField:
nested_ft = bt->BitField.fields[index]->type;
break;
default:
GB_PANIC("invalid type %s", type_to_string(nested_ft));
break;