File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
crates/ty_python_semantic/src Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -6521,8 +6521,11 @@ impl<'db> Type<'db> {
65216521 div : Type < ' db > ,
65226522 visitor : & HasDivergentTypeVisitor < ' db > ,
65236523 ) -> bool {
6524- // We don't use `any_over_type` here because we don't need/want to descend into lazy parts
6525- // of types (typevar bounds/constraints, type alias values, etc) here.
6524+ // We don't use `any_over_type` here because we don't need/want to descend into lazy
6525+ // parts of types (typevar bounds/constraints, type alias values, etc) here. If it's a lazy
6526+ // aspect of the type, it won't cause a query cycle in type inference, and we shouldn't
6527+ // trigger unnecessary inference of it. (TODO: bounds/constraints of legacy typevars aren't
6528+ // yet lazy, but they should be.)
65266529 match self {
65276530 Type :: Dynamic ( DynamicType :: Divergent ( _) ) => self == div,
65286531 Type :: Union ( union) => union. has_divergent_type_impl ( db, div, visitor) ,
You can’t perform that action at this time.
0 commit comments