Fix logic for comparisons of struct #raw_union types
This commit is contained in:
1 parent
4e370e6ed8
commit
67bc35e882
2 files changed
+5
-1
No files matched your search
@@ -1919,6 +1919,9 @@ bool is_type_comparable(Type *t) {
|
||||
return is_type_comparable(t->Opaque.elem);
|
||||
|
||||
case Type_Struct:
|
||||
if (t->Struct.is_raw_union) {
|
||||
return is_type_simple_compare(t);
|
||||
}
|
||||
for_array(i, t->Struct.fields) {
|
||||
Entity *f = t->Struct.fields[i];
|
||||
if (!is_type_comparable(f->type)) {
|
||||
|
||||
Reference in new issue
Block a user