diff options
| author | jakubtomsu <66876057+jakubtomsu@users.noreply.github.com> | 2023-10-01 13:13:09 +0200 |
|---|---|---|
| committer | jakubtomsu <66876057+jakubtomsu@users.noreply.github.com> | 2023-10-01 13:13:09 +0200 |
| commit | 394c12f68dc380aea93ad447f5f348383811d09f (patch) | |
| tree | ad77dcfacece5b0a26f7ec860f7365e6975200e1 /src | |
| parent | 1a57ad233d06e52e486f717ddea1ce15934657eb (diff) | |
Remove unnecessary check zero fields check
Diffstat (limited to 'src')
| -rw-r--r-- | src/check_type.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index ee12b90ca..d66b196bc 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -2810,7 +2810,7 @@ gb_internal bool check_type_internal(CheckerContext *ctx, Ast *e, Type **type, T } } - if (!is_sparse && t->EnumeratedArray.count > bt->Enum.fields.count && bt->Enum.fields.count > 0) { + if (!is_sparse && t->EnumeratedArray.count > bt->Enum.fields.count) { 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; |