diff options
| author | gingerBill <bill@gingerbill.org> | 2020-11-29 16:12:21 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-11-29 16:12:21 +0000 |
| commit | 57f5976ac1b5416093ef25d725c30ae5ff270809 (patch) | |
| tree | 578ed2767af296e9144fb04ec912fad8ae86e485 /src/types.cpp | |
| parent | 7fbc081119c57bf378a317fe6618eacd0465834d (diff) | |
Support map keys for simple compare types
Diffstat (limited to 'src/types.cpp')
| -rw-r--r-- | src/types.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/types.cpp b/src/types.cpp index 26f187a62..f8f7dd66e 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -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; } |