aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp
index 7c526989f..f8ed17063 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -712,6 +712,8 @@ bool is_type_numeric(Type *t) {
t = base_type(t);
if (t->kind == Type_Basic) {
return (t->Basic.flags & BasicFlag_Numeric) != 0;
+ } else if (t->kind == Type_Enum) {
+ return is_type_numeric(t->Enum.base_type);
}
// TODO(bill): Should this be here?
if (t->kind == Type_Array) {