Correct parapoly determination of generated internal type of a map

This commit is contained in:
gingerBill
2022-09-22 00:05:11 +01:00
parent 0380601bb4
commit 8c3f01fbfa
7 changed files with 11 additions and 9 deletions
-2
View File
@@ -2211,7 +2211,6 @@ void init_map_internal_types(Type *type) {
GB_ASSERT(type->kind == Type_Map);
init_map_entry_type(type);
if (type->Map.internal_type != nullptr) return;
if (type->Map.generated_struct_type != nullptr) return;
Type *key = type->Map.key;
Type *value = type->Map.value;
@@ -2239,7 +2238,6 @@ void init_map_internal_types(Type *type) {
generated_struct_type->Struct.fields = fields;
type_set_offsets(generated_struct_type);
type->Map.generated_struct_type = generated_struct_type;
type->Map.internal_type = generated_struct_type;
type->Map.lookup_result_type = make_optional_ok_type(value);
}