From ce7ff4c46c16b82c85930a529650edeab54f4540 Mon Sep 17 00:00:00 2001 From: Douglas Creager Date: Tue, 25 Nov 2025 08:37:57 -0500 Subject: [PATCH] limit to valid specializations when reducing --- crates/ty_python_semantic/src/types/signatures.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/ty_python_semantic/src/types/signatures.rs b/crates/ty_python_semantic/src/types/signatures.rs index 0460f31f08..4885558de7 100644 --- a/crates/ty_python_semantic/src/types/signatures.rs +++ b/crates/ty_python_semantic/src/types/signatures.rs @@ -829,6 +829,7 @@ impl<'db> Signature<'db> { relation_visitor, disjointness_visitor, ); + let when = when.limit_to_valid_specializations(db); // But the caller does not need to consider those extra typevars. Whatever constraint set // we produce, we reduce it back down to the inferable set that the caller asked about.