fix broken bit_set parapoly specialization #6240

This commit is contained in:
Louis Novy
2026-03-01 20:58:43 -08:00
parent 5eb7442c92
commit e3d6fe72f8
4 changed files with 13 additions and 0 deletions

View File

@@ -1501,6 +1501,11 @@ gb_internal bool is_polymorphic_type_assignable(CheckerContext *c, Type *poly, T
case Type_BitSet:
if (source->kind == Type_BitSet) {
if (!is_type_polymorphic(poly->BitSet.elem)) {
if (poly->BitSet.upper != source->BitSet.upper || poly->BitSet.lower != source->BitSet.lower) {
return false;
}
}
if (!is_polymorphic_type_assignable(c, poly->BitSet.elem, source->BitSet.elem, true, modify_type)) {
return false;
}