diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-11-03 11:01:18 +0100 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-11-03 11:01:18 +0100 |
| commit | dcc5697a48807b0e7512ab7389d8350a19198d49 (patch) | |
| tree | a7e2b1193320c8b0b5a63562efb7d66cba3ecdf2 /src/check_type.cpp | |
| parent | c20230509f61755698e4c0761bc721e0ee016b83 (diff) | |
Fix error message.
Diffstat (limited to 'src/check_type.cpp')
| -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 7c01bd5ba..05d5c674a 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -2692,7 +2692,7 @@ bool check_type_internal(CheckerContext *ctx, Ast *e, Type **type, Type *named_t if (!is_partial && 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)t->Enum.fields.count; + long long enum_count = cast(long long)bt->Enum.fields.count; error_line("\tenumerated array length: %lld\n", ea_count); error_line("\tenum field count: %lld\n", enum_count); error_line("\tSuggestion: prepend #partial to the enumerated array to allow for non-named elements\n"); |