aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-10-07 21:23:37 +0100
committergingerBill <bill@gingerbill.org>2021-10-07 21:23:37 +0100
commitd3865633441f0e22626142a0f9fbfde0e9c2ef19 (patch)
treecf86edfa3cc00486475b00cb0b904041fe86cacf /src/check_type.cpp
parent9ecc2ab15b161cea506b93e7f5607cf13dbb21f5 (diff)
Correct issue with the generated `map` type internals; Simplify map rehash logic to utilize `resize`
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index 75fa503e5..0d5c0f977 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -2058,7 +2058,6 @@ void init_map_entry_type(Type *type) {
// NOTE(bill): The preload types may have not been set yet
GB_ASSERT(t_map_hash != nullptr);
- Type *entry_type = alloc_type_struct();
/*
struct {
@@ -2076,7 +2075,7 @@ void init_map_entry_type(Type *type) {
fields[2] = alloc_entity_field(s, make_token_ident(str_lit("key")), type->Map.key, false, 2, EntityState_Resolved);
fields[3] = alloc_entity_field(s, make_token_ident(str_lit("value")), type->Map.value, false, 3, EntityState_Resolved);
-
+ Type *entry_type = alloc_type_struct();
entry_type->Struct.fields = fields;
entry_type->Struct.tags = gb_alloc_array(permanent_allocator(), String, fields.count);