aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 13b066835..d33cee97b 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -3324,7 +3324,6 @@ bool check_representable_as_constant(Checker *c, ExactValue in_value, Type *type
}
if (out_value) *out_value = v;
-
switch (type->Basic.kind) {
// case Basic_f16:
case Basic_f32:
@@ -3333,6 +3332,8 @@ bool check_representable_as_constant(Checker *c, ExactValue in_value, Type *type
case Basic_UntypedFloat:
return true;
+
+ default: GB_PANIC("Compiler error: Unknown float type!"); break;
}
} else if (is_type_complex(type)) {
ExactValue v = exact_value_to_complex(in_value);
@@ -3353,6 +3354,8 @@ bool check_representable_as_constant(Checker *c, ExactValue in_value, Type *type
} break;
case Basic_UntypedComplex:
return true;
+
+ default: GB_PANIC("Compiler error: Unknown complex type!"); break;
}
return false;