Support any comparable type for map keys

This commit is contained in:
gingerBill
2020-11-29 16:37:19 +00:00
parent b922398a96
commit 5ab7ec5b16
4 changed files with 214 additions and 28 deletions
+6
View File
@@ -1542,6 +1542,8 @@ bool is_type_valid_for_keys(Type *t) {
if (is_type_untyped(t)) {
return false;
}
return is_type_comparable(t);
#if 0
if (is_type_integer(t)) {
return true;
}
@@ -1560,8 +1562,12 @@ bool is_type_valid_for_keys(Type *t) {
if (is_type_simple_compare(t)) {
return true;
}
if (is_type_comparable(t)) {
return true;
}
return false;
#endif
}
bool is_type_valid_bit_set_elem(Type *t) {