From c1277669d22d29029cf7d0f1e7ac93568ffbd439 Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Wed, 10 Dec 2025 12:31:33 -0800 Subject: [PATCH] put the experimental change back but actually land it this time --- crates/ty_python_semantic/src/types/function.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/crates/ty_python_semantic/src/types/function.rs b/crates/ty_python_semantic/src/types/function.rs index 04dd89f1e7..cc2c358590 100644 --- a/crates/ty_python_semantic/src/types/function.rs +++ b/crates/ty_python_semantic/src/types/function.rs @@ -1028,18 +1028,6 @@ impl<'db> FunctionType<'db> { relation_visitor: &HasRelationToVisitor<'db>, disjointness_visitor: &IsDisjointVisitor<'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) { return ConstraintSet::from(false); }