mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-11 07:17:48 -04:00
Correct parapoly determination of generated internal type of a map
This commit is contained in:
1 parent
0380601bb4
commit
8c3f01fbfa
7 files changed
+11
-9
No files matched your search
+7
-1
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user