diff options
| author | gingerBill <bill@gingerbill.org> | 2020-11-29 16:37:19 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-11-29 16:37:19 +0000 |
| commit | 5ab7ec5b16b08584764b1a02441299e18328df1e (patch) | |
| tree | 07cd3c587ad179a2f11f980c173025827a776bc0 /src/types.cpp | |
| parent | b922398a962734b97d65f93db2784939bce36288 (diff) | |
Support any comparable type for map keys
Diffstat (limited to 'src/types.cpp')
| -rw-r--r-- | src/types.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp index f8f7dd66e..df87cb645 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -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) { |