diff --git a/crates/ty_python_semantic/src/types/constraints.rs b/crates/ty_python_semantic/src/types/constraints.rs index 3838b3026a..c1e7525a33 100644 --- a/crates/ty_python_semantic/src/types/constraints.rs +++ b/crates/ty_python_semantic/src/types/constraints.rs @@ -2363,6 +2363,7 @@ impl<'db> InteriorNode<'db> { // represent that intersection. We also need to add the new constraint to our // seen set and (if we haven't already seen it) to the to-visit queue. if seen_constraints.insert(intersection_constraint) { + source_orders.insert(intersection_constraint, next_source_order); to_visit.extend( (seen_constraints.iter().copied()) .filter(|seen| *seen != intersection_constraint)