From 830c194da556c8f117d4c09d2a5b5219fffffc97 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 26 Aug 2018 18:23:17 +0100 Subject: [PATCH] Allow enums for array lengths --- src/check_type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/check_type.cpp b/src/check_type.cpp index 28f3d539dae..5997a110aa1 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -1782,7 +1782,7 @@ i64 check_array_count(CheckerContext *ctx, Operand *o, Ast *e) { } return 0; } - Type *type = base_type(o->type); + Type *type = core_type(o->type); if (is_type_untyped(type) || is_type_integer(type)) { if (o->value.kind == ExactValue_Integer) { BigInt count = o->value.value_integer;