From 939802e713db92090916f0a6b7e7c0d3fc7d714b Mon Sep 17 00:00:00 2001 From: kalsprite Date: Wed, 12 Aug 2026 19:23:41 -0700 Subject: [PATCH] fix bitfield intrinsic --- src/types.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/types.cpp b/src/types.cpp index 13d335348..e9ac4260c 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -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; }