diff options
| author | gingerBill <bill@gingerbill.org> | 2019-12-27 13:55:18 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-12-27 13:55:18 +0000 |
| commit | 880c7f01a8ee71f9001ad7d9558753cf8d512845 (patch) | |
| tree | 647119090edcc7df800bccc8f264bf2604fa51db /src/check_decl.cpp | |
| parent | 10f0961184a5f486bad2050d1bb42320b833a370 (diff) | |
Fix array lengths with enum value counts.
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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; |