put the experimental change back but actually land it this time

This commit is contained in:
Jack O'Connor 2025-12-10 12:31:33 -08:00
parent fd7b9298dd
commit c1277669d2
1 changed files with 0 additions and 12 deletions

View File

@ -1028,18 +1028,6 @@ impl<'db> FunctionType<'db> {
relation_visitor: &HasRelationToVisitor<'db>, relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>, disjointness_visitor: &IsDisjointVisitor<'db>,
) -> ConstraintSet<'db> { ) -> ConstraintSet<'db> {
// A function type is the subtype of itself, and not of any other function type. However,
// our representation of a function type includes any specialization that should be applied
// to the signature. Different specializations of the same function type are only subtypes
// of each other if they result in subtype signatures.
if matches!(
relation,
TypeRelation::Subtyping | TypeRelation::Redundancy | TypeRelation::SubtypingAssuming(_)
) && self.normalized(db) == other.normalized(db)
{
return ConstraintSet::from(true);
}
if self.literal(db) != other.literal(db) { if self.literal(db) != other.literal(db) {
return ConstraintSet::from(false); return ConstraintSet::from(false);
} }