Skip to content

Commit

Permalink
Fix #3584
Browse files Browse the repository at this point in the history
  • Loading branch information
gingerBill committed May 13, 2024
1 parent f858153 commit facae34
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/check_expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1441,6 +1441,13 @@ gb_internal bool is_polymorphic_type_assignable(CheckerContext *c, Type *poly, T
// return check_is_assignable_to(c, &o, poly); // && is_type_subtype_of_and_allow_polymorphic(o.type, poly);
}
return false;

case Type_BitField:
if (source->kind == Type_BitField) {
return is_polymorphic_type_assignable(c, poly->BitField.backing_type, source->BitField.backing_type, true, modify_type);
}
return false;

case Type_Tuple:
GB_PANIC("This should never happen");
return false;
Expand Down

0 comments on commit facae34

Please sign in to comment.