Compare commits
2 Commits
main
...
dcreager/c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac3f0db809 | ||
|
|
ca4984bf8e |
@@ -31,7 +31,7 @@ use crate::types::generics::{
|
||||
use crate::types::infer::{infer_expression_type, infer_unpack_types, nearest_enclosing_class};
|
||||
use crate::types::member::{Member, class_member};
|
||||
use crate::types::relation::{
|
||||
HasRelationToVisitor, IsDisjointVisitor, IsEquivalentVisitor, TypeRelation,
|
||||
HasRelationToVisitor, IsDisjointVisitor, IsEquivalentVisitor, TypeRelation, UseConstraintSets,
|
||||
};
|
||||
use crate::types::signatures::{CallableSignature, Parameter, Parameters, Signature};
|
||||
use crate::types::tuple::{TupleSpec, TupleType};
|
||||
@@ -617,7 +617,7 @@ impl<'db> ClassType<'db> {
|
||||
db,
|
||||
other,
|
||||
inferable,
|
||||
TypeRelation::Subtyping,
|
||||
TypeRelation::Subtyping(UseConstraintSets::No),
|
||||
&HasRelationToVisitor::default(),
|
||||
&IsDisjointVisitor::default(),
|
||||
)
|
||||
@@ -635,14 +635,12 @@ impl<'db> ClassType<'db> {
|
||||
self.iter_mro(db).when_any(db, |base| {
|
||||
match base {
|
||||
ClassBase::Dynamic(_) => match relation {
|
||||
TypeRelation::Subtyping
|
||||
TypeRelation::Subtyping(_)
|
||||
| TypeRelation::Redundancy
|
||||
| TypeRelation::SubtypingAssuming(_) => {
|
||||
ConstraintSet::from(other.is_object(db))
|
||||
}
|
||||
TypeRelation::Assignability | TypeRelation::ConstraintSetAssignability => {
|
||||
ConstraintSet::from(!other.is_final(db))
|
||||
}
|
||||
TypeRelation::Assignability(_) => ConstraintSet::from(!other.is_final(db)),
|
||||
},
|
||||
|
||||
// Protocol, Generic, and TypedDict are not represented by a ClassType.
|
||||
|
||||
@@ -747,12 +747,16 @@ impl<'db> ConstrainedTypeVar<'db> {
|
||||
if !self.typevar(db).is_same_typevar_as(db, other.typevar(db)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Note that we check that the bounds are _subtypes_ of each other, because we do not want
|
||||
// dynamic types like `Any` to be pivots that we can use to compute transitive sequent map
|
||||
// relationships.
|
||||
other
|
||||
.lower(db)
|
||||
.is_constraint_set_assignable_to(db, self.lower(db))
|
||||
.is_constraint_set_subtype_of(db, self.lower(db))
|
||||
&& self
|
||||
.upper(db)
|
||||
.is_constraint_set_assignable_to(db, other.upper(db))
|
||||
.is_constraint_set_subtype_of(db, other.upper(db))
|
||||
}
|
||||
|
||||
/// Returns the intersection of two range constraints, or `None` if the intersection is empty.
|
||||
@@ -763,7 +767,7 @@ impl<'db> ConstrainedTypeVar<'db> {
|
||||
|
||||
// If `lower ≰ upper`, then the intersection is empty, since there is no type that is both
|
||||
// greater than `lower`, and less than `upper`.
|
||||
if !lower.is_constraint_set_assignable_to(db, upper) {
|
||||
if !lower.is_constraint_set_subtype_of(db, upper) {
|
||||
return IntersectionResult::Disjoint;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ use crate::types::class_base::ClassBase;
|
||||
use crate::types::constraints::{ConstraintSet, IteratorConstraintsExtension};
|
||||
use crate::types::instance::{Protocol, ProtocolInstanceType};
|
||||
use crate::types::relation::{
|
||||
HasRelationToVisitor, IsDisjointVisitor, IsEquivalentVisitor, TypeRelation,
|
||||
HasRelationToVisitor, IsDisjointVisitor, IsEquivalentVisitor, TypeRelation, UseConstraintSets,
|
||||
};
|
||||
use crate::types::signatures::Parameters;
|
||||
use crate::types::tuple::{TupleSpec, TupleType, walk_tuple_type};
|
||||
@@ -800,7 +800,7 @@ fn is_subtype_in_invariant_position<'db>(
|
||||
db,
|
||||
base,
|
||||
inferable,
|
||||
TypeRelation::Subtyping,
|
||||
TypeRelation::Subtyping(UseConstraintSets::No),
|
||||
relation_visitor,
|
||||
disjointness_visitor,
|
||||
)
|
||||
@@ -905,7 +905,9 @@ fn has_relation_in_invariant_position<'db>(
|
||||
(
|
||||
None,
|
||||
Some(base_mat),
|
||||
TypeRelation::Subtyping | TypeRelation::Redundancy | TypeRelation::SubtypingAssuming(_),
|
||||
TypeRelation::Subtyping(_)
|
||||
| TypeRelation::Redundancy
|
||||
| TypeRelation::SubtypingAssuming(_),
|
||||
) => is_subtype_in_invariant_position(
|
||||
db,
|
||||
derived_type,
|
||||
@@ -919,7 +921,9 @@ fn has_relation_in_invariant_position<'db>(
|
||||
(
|
||||
Some(derived_mat),
|
||||
None,
|
||||
TypeRelation::Subtyping | TypeRelation::Redundancy | TypeRelation::SubtypingAssuming(_),
|
||||
TypeRelation::Subtyping(_)
|
||||
| TypeRelation::Redundancy
|
||||
| TypeRelation::SubtypingAssuming(_),
|
||||
) => is_subtype_in_invariant_position(
|
||||
db,
|
||||
derived_type,
|
||||
@@ -931,11 +935,7 @@ fn has_relation_in_invariant_position<'db>(
|
||||
disjointness_visitor,
|
||||
),
|
||||
// And A <~ B (assignability) is Bottom[A] <: Top[B]
|
||||
(
|
||||
None,
|
||||
Some(base_mat),
|
||||
TypeRelation::Assignability | TypeRelation::ConstraintSetAssignability,
|
||||
) => is_subtype_in_invariant_position(
|
||||
(None, Some(base_mat), TypeRelation::Assignability(_)) => is_subtype_in_invariant_position(
|
||||
db,
|
||||
derived_type,
|
||||
MaterializationKind::Bottom,
|
||||
@@ -945,20 +945,18 @@ fn has_relation_in_invariant_position<'db>(
|
||||
relation_visitor,
|
||||
disjointness_visitor,
|
||||
),
|
||||
(
|
||||
Some(derived_mat),
|
||||
None,
|
||||
TypeRelation::Assignability | TypeRelation::ConstraintSetAssignability,
|
||||
) => is_subtype_in_invariant_position(
|
||||
db,
|
||||
derived_type,
|
||||
derived_mat,
|
||||
base_type,
|
||||
MaterializationKind::Top,
|
||||
inferable,
|
||||
relation_visitor,
|
||||
disjointness_visitor,
|
||||
),
|
||||
(Some(derived_mat), None, TypeRelation::Assignability(_)) => {
|
||||
is_subtype_in_invariant_position(
|
||||
db,
|
||||
derived_type,
|
||||
derived_mat,
|
||||
base_type,
|
||||
MaterializationKind::Top,
|
||||
inferable,
|
||||
relation_visitor,
|
||||
disjointness_visitor,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ use crate::types::enums::is_single_member_enum;
|
||||
use crate::types::generics::{InferableTypeVars, walk_specialization};
|
||||
use crate::types::protocol_class::{ProtocolClass, walk_protocol_interface};
|
||||
use crate::types::relation::{
|
||||
HasRelationToVisitor, IsDisjointVisitor, IsEquivalentVisitor, TypeRelation,
|
||||
HasRelationToVisitor, IsDisjointVisitor, IsEquivalentVisitor, TypeRelation, UseConstraintSets,
|
||||
};
|
||||
use crate::types::tuple::{TupleSpec, TupleType, walk_tuple_type};
|
||||
use crate::types::{
|
||||
@@ -708,7 +708,7 @@ impl<'db> ProtocolInstanceType<'db> {
|
||||
db,
|
||||
protocol,
|
||||
InferableTypeVars::None,
|
||||
TypeRelation::Subtyping,
|
||||
TypeRelation::Subtyping(UseConstraintSets::No),
|
||||
&HasRelationToVisitor::default(),
|
||||
&IsDisjointVisitor::default(),
|
||||
)
|
||||
|
||||
@@ -13,6 +13,14 @@ use crate::{
|
||||
types::{Type, constraints::ConstraintSet, generics::InferableTypeVars},
|
||||
};
|
||||
|
||||
/// Whether to use the new constraint set rules when comparing typevars. This will eventually be
|
||||
/// used across the board, but for now this gives us a way to opt into the new logic incrementally.
|
||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
||||
pub(crate) enum UseConstraintSets {
|
||||
No,
|
||||
Yes,
|
||||
}
|
||||
|
||||
/// A non-exhaustive enumeration of relations that can exist between types.
|
||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
||||
pub(crate) enum TypeRelation<'db> {
|
||||
@@ -44,7 +52,7 @@ pub(crate) enum TypeRelation<'db> {
|
||||
///
|
||||
/// [fully static]: https://typing.python.org/en/latest/spec/glossary.html#term-fully-static-type
|
||||
/// [materialization]: https://typing.python.org/en/latest/spec/glossary.html#term-materialize
|
||||
Subtyping,
|
||||
Subtyping(UseConstraintSets),
|
||||
|
||||
/// The "assignability" relation.
|
||||
///
|
||||
@@ -82,7 +90,7 @@ pub(crate) enum TypeRelation<'db> {
|
||||
///
|
||||
/// [fully static]: https://typing.python.org/en/latest/spec/glossary.html#term-fully-static-type
|
||||
/// [materialization]: https://typing.python.org/en/latest/spec/glossary.html#term-materialize
|
||||
Assignability,
|
||||
Assignability(UseConstraintSets),
|
||||
|
||||
/// The "redundancy" relation.
|
||||
///
|
||||
@@ -176,24 +184,27 @@ pub(crate) enum TypeRelation<'db> {
|
||||
/// are not actually subtypes of each other. (That is, `implies_subtype_of(false, int, str)`
|
||||
/// will return true!)
|
||||
SubtypingAssuming(ConstraintSet<'db>),
|
||||
|
||||
/// A placeholder for the new assignability relation that uses constraint sets to encode
|
||||
/// relationships with a typevar. This will eventually replace `Assignability`, but allows us
|
||||
/// to start using the new relation in a controlled manner in some places.
|
||||
ConstraintSetAssignability,
|
||||
}
|
||||
|
||||
impl TypeRelation<'_> {
|
||||
pub(crate) const fn is_assignability(self) -> bool {
|
||||
matches!(self, TypeRelation::Assignability)
|
||||
matches!(self, TypeRelation::Assignability(UseConstraintSets::No))
|
||||
}
|
||||
|
||||
pub(crate) const fn is_constraint_set_assignability(self) -> bool {
|
||||
matches!(self, TypeRelation::ConstraintSetAssignability)
|
||||
pub(crate) const fn is_any_assignability(self) -> bool {
|
||||
matches!(self, TypeRelation::Assignability(_))
|
||||
}
|
||||
|
||||
pub(crate) const fn is_subtyping(self) -> bool {
|
||||
matches!(self, TypeRelation::Subtyping)
|
||||
matches!(self, TypeRelation::Subtyping(UseConstraintSets::No))
|
||||
}
|
||||
|
||||
pub(crate) const fn uses_constraint_set_rules(self) -> bool {
|
||||
matches!(
|
||||
self,
|
||||
TypeRelation::Assignability(UseConstraintSets::Yes)
|
||||
| TypeRelation::Subtyping(UseConstraintSets::Yes)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,7 +224,12 @@ impl<'db> Type<'db> {
|
||||
target: Type<'db>,
|
||||
inferable: InferableTypeVars<'_, 'db>,
|
||||
) -> ConstraintSet<'db> {
|
||||
self.has_relation_to(db, target, inferable, TypeRelation::Subtyping)
|
||||
self.has_relation_to(
|
||||
db,
|
||||
target,
|
||||
inferable,
|
||||
TypeRelation::Subtyping(UseConstraintSets::No),
|
||||
)
|
||||
}
|
||||
|
||||
/// Return the constraints under which this type is a subtype of type `target`, assuming that
|
||||
@@ -244,22 +260,29 @@ impl<'db> Type<'db> {
|
||||
}
|
||||
|
||||
/// Return true if this type is assignable to type `target` using constraint-set assignability.
|
||||
///
|
||||
/// This uses `TypeRelation::ConstraintSetAssignability`, which encodes typevar relations into
|
||||
/// a constraint set and lets `satisfied_by_all_typevars` perform existential vs universal
|
||||
/// reasoning depending on inferable typevars.
|
||||
pub fn is_constraint_set_assignable_to(self, db: &'db dyn Db, target: Type<'db>) -> bool {
|
||||
self.when_constraint_set_assignable_to(db, target, InferableTypeVars::None)
|
||||
.is_always_satisfied(db)
|
||||
}
|
||||
|
||||
/// Return true if this type is assignable to type `target` using constraint-set assignability.
|
||||
pub fn is_constraint_set_subtype_of(self, db: &'db dyn Db, target: Type<'db>) -> bool {
|
||||
self.when_constraint_set_subtype_of(db, target, InferableTypeVars::None)
|
||||
.is_always_satisfied(db)
|
||||
}
|
||||
|
||||
pub(super) fn when_assignable_to(
|
||||
self,
|
||||
db: &'db dyn Db,
|
||||
target: Type<'db>,
|
||||
inferable: InferableTypeVars<'_, 'db>,
|
||||
) -> ConstraintSet<'db> {
|
||||
self.has_relation_to(db, target, inferable, TypeRelation::Assignability)
|
||||
self.has_relation_to(
|
||||
db,
|
||||
target,
|
||||
inferable,
|
||||
TypeRelation::Assignability(UseConstraintSets::No),
|
||||
)
|
||||
}
|
||||
|
||||
pub(super) fn when_constraint_set_assignable_to(
|
||||
@@ -272,7 +295,21 @@ impl<'db> Type<'db> {
|
||||
db,
|
||||
target,
|
||||
inferable,
|
||||
TypeRelation::ConstraintSetAssignability,
|
||||
TypeRelation::Assignability(UseConstraintSets::Yes),
|
||||
)
|
||||
}
|
||||
|
||||
pub(super) fn when_constraint_set_subtype_of(
|
||||
self,
|
||||
db: &'db dyn Db,
|
||||
target: Type<'db>,
|
||||
inferable: InferableTypeVars<'_, 'db>,
|
||||
) -> ConstraintSet<'db> {
|
||||
self.has_relation_to(
|
||||
db,
|
||||
target,
|
||||
inferable,
|
||||
TypeRelation::Subtyping(UseConstraintSets::Yes),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -343,7 +380,7 @@ impl<'db> Type<'db> {
|
||||
|
||||
// Handle the new constraint-set-based assignability relation next. Comparisons with a
|
||||
// typevar are translated directly into a constraint set.
|
||||
if relation.is_constraint_set_assignability() {
|
||||
if relation.uses_constraint_set_rules() {
|
||||
// A typevar satisfies a relation when...it satisfies the relation. Yes that's a
|
||||
// tautology! We're moving the caller's subtyping/assignability requirement into a
|
||||
// constraint set. If the typevar has an upper bound or constraints, then the relation
|
||||
@@ -435,8 +472,8 @@ impl<'db> Type<'db> {
|
||||
"DynamicType::Divergent should have been handled in an earlier branch"
|
||||
);
|
||||
ConstraintSet::from(match relation {
|
||||
TypeRelation::Subtyping | TypeRelation::SubtypingAssuming(_) => false,
|
||||
TypeRelation::Assignability | TypeRelation::ConstraintSetAssignability => true,
|
||||
TypeRelation::Subtyping(_) | TypeRelation::SubtypingAssuming(_) => false,
|
||||
TypeRelation::Assignability(_) => true,
|
||||
TypeRelation::Redundancy => match target {
|
||||
Type::Dynamic(_) => true,
|
||||
Type::Union(union) => union.elements(db).iter().any(Type::is_dynamic),
|
||||
@@ -445,8 +482,8 @@ impl<'db> Type<'db> {
|
||||
})
|
||||
}
|
||||
(_, Type::Dynamic(_)) => ConstraintSet::from(match relation {
|
||||
TypeRelation::Subtyping | TypeRelation::SubtypingAssuming(_) => false,
|
||||
TypeRelation::Assignability | TypeRelation::ConstraintSetAssignability => true,
|
||||
TypeRelation::Subtyping(_) | TypeRelation::SubtypingAssuming(_) => false,
|
||||
TypeRelation::Assignability(_) => true,
|
||||
TypeRelation::Redundancy => match self {
|
||||
Type::Dynamic(_) => true,
|
||||
Type::Intersection(intersection) => {
|
||||
@@ -780,22 +817,17 @@ impl<'db> Type<'db> {
|
||||
// to non-transitivity (highly undesirable); and pragmatically, a full implementation
|
||||
// of redundancy may not generally lead to simpler types in many situations.
|
||||
let self_ty = match relation {
|
||||
TypeRelation::Subtyping
|
||||
TypeRelation::Subtyping(_)
|
||||
| TypeRelation::Redundancy
|
||||
| TypeRelation::SubtypingAssuming(_) => self,
|
||||
TypeRelation::Assignability | TypeRelation::ConstraintSetAssignability => {
|
||||
self.bottom_materialization(db)
|
||||
}
|
||||
TypeRelation::Assignability(_) => self.bottom_materialization(db),
|
||||
};
|
||||
intersection.negative(db).iter().when_all(db, |&neg_ty| {
|
||||
let neg_ty = match relation {
|
||||
TypeRelation::Subtyping
|
||||
TypeRelation::Subtyping(_)
|
||||
| TypeRelation::Redundancy
|
||||
| TypeRelation::SubtypingAssuming(_) => neg_ty,
|
||||
TypeRelation::Assignability
|
||||
| TypeRelation::ConstraintSetAssignability => {
|
||||
neg_ty.bottom_materialization(db)
|
||||
}
|
||||
TypeRelation::Assignability(_) => neg_ty.bottom_materialization(db),
|
||||
};
|
||||
self_ty.is_disjoint_from_impl(
|
||||
db,
|
||||
@@ -1799,7 +1831,7 @@ impl<'db> Type<'db> {
|
||||
db,
|
||||
neg_ty,
|
||||
inferable,
|
||||
TypeRelation::Subtyping,
|
||||
TypeRelation::Subtyping(UseConstraintSets::No),
|
||||
relation_visitor,
|
||||
disjointness_visitor,
|
||||
)
|
||||
@@ -2169,7 +2201,7 @@ impl<'db> Type<'db> {
|
||||
db,
|
||||
instance,
|
||||
inferable,
|
||||
TypeRelation::Subtyping,
|
||||
TypeRelation::Subtyping(UseConstraintSets::No),
|
||||
relation_visitor,
|
||||
disjointness_visitor,
|
||||
)
|
||||
@@ -2193,7 +2225,7 @@ impl<'db> Type<'db> {
|
||||
db,
|
||||
instance,
|
||||
inferable,
|
||||
TypeRelation::Subtyping,
|
||||
TypeRelation::Subtyping(UseConstraintSets::No),
|
||||
relation_visitor,
|
||||
disjointness_visitor,
|
||||
)
|
||||
@@ -2287,7 +2319,7 @@ impl<'db> Type<'db> {
|
||||
db,
|
||||
Type::Callable(CallableType::unknown(db)),
|
||||
inferable,
|
||||
TypeRelation::Assignability,
|
||||
TypeRelation::Assignability(UseConstraintSets::No),
|
||||
relation_visitor,
|
||||
disjointness_visitor,
|
||||
)
|
||||
@@ -2389,7 +2421,7 @@ impl<'db> Type<'db> {
|
||||
db,
|
||||
other,
|
||||
inferable,
|
||||
TypeRelation::Assignability,
|
||||
TypeRelation::Assignability(UseConstraintSets::No),
|
||||
relation_visitor,
|
||||
disjointness_visitor,
|
||||
)
|
||||
|
||||
@@ -24,7 +24,7 @@ use crate::types::constraints::{
|
||||
use crate::types::generics::{GenericContext, InferableTypeVars, walk_generic_context};
|
||||
use crate::types::infer::{infer_deferred_types, infer_scope_types};
|
||||
use crate::types::relation::{
|
||||
HasRelationToVisitor, IsDisjointVisitor, IsEquivalentVisitor, TypeRelation,
|
||||
HasRelationToVisitor, IsDisjointVisitor, IsEquivalentVisitor, TypeRelation, UseConstraintSets,
|
||||
};
|
||||
use crate::types::{
|
||||
ApplyTypeMappingVisitor, BindingContext, BoundTypeVarInstance, CallableType, CallableTypeKind,
|
||||
@@ -316,7 +316,7 @@ impl<'db> CallableSignature<'db> {
|
||||
db,
|
||||
other,
|
||||
inferable,
|
||||
TypeRelation::Subtyping,
|
||||
TypeRelation::Subtyping(UseConstraintSets::No),
|
||||
&HasRelationToVisitor::default(),
|
||||
&IsDisjointVisitor::default(),
|
||||
)
|
||||
@@ -374,7 +374,7 @@ impl<'db> CallableSignature<'db> {
|
||||
db,
|
||||
other,
|
||||
inferable,
|
||||
TypeRelation::ConstraintSetAssignability,
|
||||
TypeRelation::Assignability(UseConstraintSets::Yes),
|
||||
&HasRelationToVisitor::default(),
|
||||
&IsDisjointVisitor::default(),
|
||||
)
|
||||
@@ -391,7 +391,7 @@ impl<'db> CallableSignature<'db> {
|
||||
relation_visitor: &HasRelationToVisitor<'db>,
|
||||
disjointness_visitor: &IsDisjointVisitor<'db>,
|
||||
) -> ConstraintSet<'db> {
|
||||
if relation.is_constraint_set_assignability() {
|
||||
if relation.uses_constraint_set_rules() {
|
||||
// TODO: Oof, maybe ParamSpec needs to live at CallableSignature, not Signature?
|
||||
let self_is_single_paramspec = Self::signatures_is_single_paramspec(self_signatures);
|
||||
let other_is_single_paramspec = Self::signatures_is_single_paramspec(other_signatures);
|
||||
@@ -1152,7 +1152,7 @@ impl<'db> Signature<'db> {
|
||||
db,
|
||||
other,
|
||||
inferable,
|
||||
TypeRelation::ConstraintSetAssignability,
|
||||
TypeRelation::Assignability(UseConstraintSets::Yes),
|
||||
&HasRelationToVisitor::default(),
|
||||
&IsDisjointVisitor::default(),
|
||||
)
|
||||
@@ -1345,16 +1345,11 @@ impl<'db> Signature<'db> {
|
||||
// If either of the parameter lists is gradual (`...`), then it is assignable to and from
|
||||
// any other parameter list, but not a subtype or supertype of any other parameter list.
|
||||
if self.parameters.is_gradual() || other.parameters.is_gradual() {
|
||||
result.intersect(
|
||||
db,
|
||||
ConstraintSet::from(
|
||||
relation.is_assignability() || relation.is_constraint_set_assignability(),
|
||||
),
|
||||
);
|
||||
result.intersect(db, ConstraintSet::from(relation.is_any_assignability()));
|
||||
return result;
|
||||
}
|
||||
|
||||
if relation.is_constraint_set_assignability() {
|
||||
if relation.uses_constraint_set_rules() {
|
||||
let self_is_paramspec = self.parameters.as_paramspec();
|
||||
let other_is_paramspec = other.parameters.as_paramspec();
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ use crate::types::class::FieldKind;
|
||||
use crate::types::constraints::{ConstraintSet, IteratorConstraintsExtension};
|
||||
use crate::types::generics::InferableTypeVars;
|
||||
use crate::types::relation::{
|
||||
HasRelationToVisitor, IsDisjointVisitor, IsEquivalentVisitor, TypeRelation,
|
||||
HasRelationToVisitor, IsDisjointVisitor, IsEquivalentVisitor, TypeRelation, UseConstraintSets,
|
||||
};
|
||||
use crate::types::{NormalizedVisitor, TypeContext};
|
||||
|
||||
@@ -430,7 +430,7 @@ impl<'db> TypedDictType<'db> {
|
||||
db,
|
||||
other_field.declared_ty,
|
||||
inferable,
|
||||
TypeRelation::Assignability,
|
||||
TypeRelation::Assignability(UseConstraintSets::No),
|
||||
relation_visitor,
|
||||
disjointness_visitor,
|
||||
)
|
||||
@@ -439,7 +439,7 @@ impl<'db> TypedDictType<'db> {
|
||||
db,
|
||||
self_field.declared_ty,
|
||||
inferable,
|
||||
TypeRelation::Assignability,
|
||||
TypeRelation::Assignability(UseConstraintSets::No),
|
||||
relation_visitor,
|
||||
disjointness_visitor,
|
||||
)
|
||||
@@ -453,7 +453,7 @@ impl<'db> TypedDictType<'db> {
|
||||
db,
|
||||
other_field.declared_ty,
|
||||
inferable,
|
||||
TypeRelation::Assignability,
|
||||
TypeRelation::Assignability(UseConstraintSets::No),
|
||||
relation_visitor,
|
||||
disjointness_visitor,
|
||||
)
|
||||
@@ -466,7 +466,7 @@ impl<'db> TypedDictType<'db> {
|
||||
db,
|
||||
self_field.declared_ty,
|
||||
inferable,
|
||||
TypeRelation::Assignability,
|
||||
TypeRelation::Assignability(UseConstraintSets::No),
|
||||
relation_visitor,
|
||||
disjointness_visitor,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user