diff options
| author | gingerBill <bill@gingerbill.org> | 2024-03-21 12:05:15 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-03-21 12:05:15 +0000 |
| commit | 6e2efce670fa7dd18fbecb7440c6179ddc283218 (patch) | |
| tree | cd47b2f3353951dcf132e1950139e83a1022404f /src/check_type.cpp | |
| parent | 6d7afd3fa917db5f897d2fbdc2bc657215062467 (diff) | |
Fix missing `ERROR_BLOCK();` calls
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index 96885bd27..ee9a60059 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -2396,6 +2396,8 @@ gb_internal i64 check_array_count(CheckerContext *ctx, Operand *o, Ast *e) { return 0; } + ERROR_BLOCK(); + gbString s = expr_to_string(o->expr); error(e, "Array count must be a constant integer, got %s", s); gb_string_free(s); @@ -2878,6 +2880,8 @@ gb_internal void check_array_type_internal(CheckerContext *ctx, Ast *e, Type **t } if (!is_sparse && t->EnumeratedArray.count > bt->Enum.fields.count) { + ERROR_BLOCK(); + error(e, "Non-contiguous enumeration used as an index in an enumerated array"); long long ea_count = cast(long long)t->EnumeratedArray.count; long long enum_count = cast(long long)bt->Enum.fields.count; |