mirror of https://github.com/astral-sh/ruff
check lower/upper bounds in satisfied_by_all_typevars
This commit is contained in:
parent
fe19d2de21
commit
221507f828
|
|
@ -1051,6 +1051,12 @@ impl<'db> Node<'db> {
|
|||
let mut typevars = FxHashSet::default();
|
||||
self.for_each_constraint(db, &mut |constraint| {
|
||||
typevars.insert(constraint.typevar(db));
|
||||
if let Type::TypeVar(bound_typevar) = constraint.lower(db) {
|
||||
typevars.insert(bound_typevar);
|
||||
}
|
||||
if let Type::TypeVar(bound_typevar) = constraint.upper(db) {
|
||||
typevars.insert(bound_typevar);
|
||||
}
|
||||
});
|
||||
|
||||
// Returns if some specialization satisfies this constraint set.
|
||||
|
|
|
|||
Loading…
Reference in New Issue