aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorjakubtomsu <66876057+jakubtomsu@users.noreply.github.com>2023-10-01 13:09:08 +0200
committerjakubtomsu <66876057+jakubtomsu@users.noreply.github.com>2023-10-01 13:09:08 +0200
commit1a57ad233d06e52e486f717ddea1ce15934657eb (patch)
treed45923b45bf5b639d34fa946df55ac6dda7d46fa /src/check_type.cpp
parentc2684634132c0af6f2bd042280fcf667576fceb5 (diff)
Fix field count in enumerated array type info
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index 3360df040..ee12b90ca 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -2797,7 +2797,7 @@ gb_internal bool check_type_internal(CheckerContext *ctx, Ast *e, Type **type, T
Type *bt = base_type(index);
GB_ASSERT(bt->kind == Type_Enum);
- Type *t = alloc_type_enumerated_array(elem, index, bt->Enum.min_value, bt->Enum.max_value, Token_Invalid);
+ Type *t = alloc_type_enumerated_array(elem, index, bt->Enum.min_value, bt->Enum.max_value, bt->Enum.fields.count, Token_Invalid);
bool is_sparse = false;
if (at->tag != nullptr) {