fix bitfield intrinsic

This commit is contained in:
kalsprite
2026-08-12 19:23:41 -07:00
parent fa342bb540
commit 939802e713

View File

@@ -1446,11 +1446,13 @@ gb_internal bool is_type_ordered(Type *t) {
return false;
}
gb_internal bool is_type_ordered_numeric(Type *t) {
t = core_type(t);
t = base_type(t);
if (t == nullptr) { return false; }
switch (t->kind) {
case Type_Basic:
return (t->Basic.flags & BasicFlag_OrderedNumeric) != 0;
case Type_Enum:
return is_type_ordered_numeric(t->Enum.base_type);
}
return false;
}