Skip to content

Commit a40bd9a

Browse files
committed
fix tests after rebase
1 parent 5d8aa44 commit a40bd9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/ty_python_semantic/src/types/builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ impl<'db> InnerIntersectionBuilder<'db> {
942942
let mut to_remove = SmallVec::<[usize; 1]>::new();
943943
for (index, existing_negative) in self.negative.iter().enumerate() {
944944
// S & ~T = Never if S <: T
945-
if new_positive.is_redundant_in_union_with(db, *existing_negative) {
945+
if new_positive.is_subtype_of(db, *existing_negative) {
946946
*self = Self::default();
947947
self.positive.insert(Type::Never);
948948
return;
@@ -1036,7 +1036,7 @@ impl<'db> InnerIntersectionBuilder<'db> {
10361036

10371037
for existing_positive in &self.positive {
10381038
// S & ~T = Never if S <: T
1039-
if existing_positive.is_redundant_in_union_with(db, new_negative) {
1039+
if existing_positive.is_subtype_of(db, new_negative) {
10401040
*self = Self::default();
10411041
self.positive.insert(Type::Never);
10421042
return;

0 commit comments

Comments
 (0)