diff options
| author | gingerBill <bill@gingerbill.org> | 2023-02-17 17:02:37 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-02-17 17:02:37 +0000 |
| commit | 66f2881a78b717bdb8410956ccbffb679fbccea5 (patch) | |
| tree | d83e59dd37807ec543eae7df0c1082b17ef74e0c /src/types.cpp | |
| parent | 7d4e9497ebcd610f5fa0ba7756429b8e839588ac (diff) | |
Allow comparisons between empty `struct{}` and `union{}`
Diffstat (limited to 'src/types.cpp')
| -rw-r--r-- | src/types.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/types.cpp b/src/types.cpp index 7a1f17a16..85364667d 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -2313,9 +2313,6 @@ gb_internal bool is_type_comparable(Type *t) { return true; case Type_Struct: - if (type_size_of(t) == 0) { - return false; - } if (t->Struct.soa_kind != StructSoa_None) { return false; } @@ -2331,9 +2328,6 @@ gb_internal bool is_type_comparable(Type *t) { return true; case Type_Union: - if (type_size_of(t) == 0) { - return false; - } for_array(i, t->Union.variants) { Type *v = t->Union.variants[i]; if (!is_type_comparable(v)) { |