Allow unions which are comparable to also be valid map keys (i.e. hashable)

This commit is contained in:
gingerBill
2021-05-03 13:38:15 +01:00
parent 518ecaf9c9
commit 1a3784c4df
3 changed files with 43 additions and 5 deletions

View File

@@ -1544,9 +1544,6 @@ bool is_type_valid_for_keys(Type *t) {
if (is_type_untyped(t)) {
return false;
}
if (t->kind == Type_Union) {
return false;
}
return is_type_comparable(t);
}