mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-16 19:02:23 -07:00
Allow comparisons between empty struct{} and union{}
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user