aboutsummaryrefslogtreecommitdiff
path: root/src/type.cff
diff options
context:
space:
mode:
Diffstat (limited to 'src/type.cff')
-rw-r--r--src/type.cff3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/type.cff b/src/type.cff
index b0cb259..a07ea0d 100644
--- a/src/type.cff
+++ b/src/type.cff
@@ -208,6 +208,9 @@ extern fn mkslicetype(child *const Type) *const Type {
fn numtype2rank(ty *const Type) int {
ty = unconstify(ty);
switch {
+ case ty->is(:Enum);
+ assert(ty.u.Enum.lax, "lax");
+ return numtype2rank(ty.u.Enum.intty);
case ty->is(:Int) and (ty == ty_int or ty.size < ty_int.size);
return 0;
case ty == ty_uint; return 1;