Support map keys for simple compare types

This commit is contained in:
gingerBill
2020-11-29 16:12:21 +00:00
parent 7fbc081119
commit 57f5976ac1
5 changed files with 26 additions and 7 deletions
+3 -1
View File
@@ -964,7 +964,6 @@ bool is_type_valid_for_keys(Type *t);
Type *alloc_type_map(i64 count, Type *key, Type *value) {
if (key != nullptr) {
GB_ASSERT(is_type_valid_for_keys(key));
GB_ASSERT(value != nullptr);
}
Type *t = alloc_type(Type_Map);
@@ -1558,6 +1557,9 @@ bool is_type_valid_for_keys(Type *t) {
if (is_type_typeid(t)) {
return true;
}
if (is_type_simple_compare(t)) {
return true;
}
return false;
}