mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-14 09:44:26 +00:00
Merge pull request #7296 from kalsprite/comparable_unspecialized
type_is_comparable: false for an unspecialized polymorphic record
This commit is contained in:
@@ -2824,6 +2824,10 @@ gb_internal bool is_type_comparable(Type *t) {
|
||||
if (t->Struct.soa_kind != StructSoa_None) {
|
||||
return false;
|
||||
}
|
||||
// an unspecialized polymorphic record has no values to compare
|
||||
if (is_type_polymorphic_record_unspecialized(t)) {
|
||||
return false;
|
||||
}
|
||||
if (t->Struct.is_raw_union) {
|
||||
return is_type_simple_compare(t);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user