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

View File

@@ -1360,7 +1360,13 @@ bool is_polymorphic_type_assignable(CheckerContext *c, Type *poly, Type *source,
if (source->kind == Type_Map) {
bool key = is_polymorphic_type_assignable(c, poly->Map.key, source->Map.key, true, modify_type);
bool value = is_polymorphic_type_assignable(c, poly->Map.value, source->Map.value, true, modify_type);
return key || value;
if (key || value) {
poly->Map.entry_type = nullptr;
poly->Map.internal_type = nullptr;
poly->Map.lookup_result_type = nullptr;
init_map_internal_types(poly);
return true;
}
}
return false;