From 880c7f01a8ee71f9001ad7d9558753cf8d512845 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Fri, 27 Dec 2019 13:55:18 +0000 Subject: Fix array lengths with enum value counts. --- src/check_decl.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/check_decl.cpp') diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 5f8a5be4f..70344339c 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -161,6 +161,8 @@ void check_init_constant(CheckerContext *ctx, Entity *e, Operand *operand) { } return; } + +#if 1 if (!is_type_constant_type(operand->type)) { gbString type_str = type_to_string(operand->type); error(operand->expr, "Invalid constant type: '%s'", type_str); @@ -170,6 +172,7 @@ void check_init_constant(CheckerContext *ctx, Entity *e, Operand *operand) { } return; } +#endif if (e->type == nullptr) { // NOTE(bill): type inference e->type = operand->type; -- cgit v1.2.3