Skip to content

Commit f0edf5c

Browse files
committed
use and() instead of intersect()
1 parent e70da11 commit f0edf5c

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

crates/ty_python_semantic/src/types/typed_dict.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,17 +141,16 @@ impl<'db> TypedDictType<'db> {
141141
relation_visitor,
142142
disjointness_visitor,
143143
)
144-
.intersect(
145-
db,
144+
.and(db, || {
146145
target_item_field.declared_ty.has_relation_to_impl(
147146
db,
148147
self_item_field.declared_ty,
149148
inferable,
150149
relation,
151150
relation_visitor,
152151
disjointness_visitor,
153-
),
154-
)
152+
)
153+
})
155154
}
156155
} else {
157156
// `NotRequired[]` target fields
@@ -211,17 +210,16 @@ impl<'db> TypedDictType<'db> {
211210
relation_visitor,
212211
disjointness_visitor,
213212
)
214-
.intersect(
215-
db,
213+
.and(db, || {
216214
target_item_field.declared_ty.has_relation_to_impl(
217215
db,
218216
self_item_field.declared_ty,
219217
inferable,
220218
relation,
221219
relation_visitor,
222220
disjointness_visitor,
223-
),
224-
)
221+
)
222+
})
225223
} else {
226224
// Self is missing this not-required, mutable field. This isn't ok if self
227225
// has read-only extra items, which all `TypedDict`s effectively do until

0 commit comments

Comments
 (0)