mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-14 01:34:35 +00:00
Merge pull request #7325 from kalsprite/ordered_numeric_bit_field
fix bitfield intrinsic
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user