Skip to content

Commit b32fc8b

Browse files
committed
expand comment
1 parent fe35b02 commit b32fc8b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

crates/ty_python_semantic/src/types.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff 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),

0 commit comments

Comments
 (0)