We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8779dae commit 14b636aCopy full SHA for 14b636a
crates/ty_python_semantic/src/types/type_ordering.rs
@@ -139,6 +139,8 @@ pub(super) fn union_or_intersection_elements_ordering<'db>(
139
(Type::ProtocolInstance(_), _) => Ordering::Less,
140
(_, Type::ProtocolInstance(_)) => Ordering::Greater,
141
142
+ // This is one place where we want to compare the typevar identities directly, instead of
143
+ // falling back on `is_same_typevar_as` or `can_be_bound_for`.
144
(Type::TypeVar(left), Type::TypeVar(right)) => left.as_id().cmp(&right.as_id()),
145
(Type::TypeVar(_), _) => Ordering::Less,
146
(_, Type::TypeVar(_)) => Ordering::Greater,
0 commit comments