mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-17 03:12:22 -07:00
Support map keys for simple compare types
This commit is contained in:
+3
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user