Skip to content

Commit 0a4807b

Browse files
committed
AST: Nuke TypeMatcher::considerThrownErrorTypes()
1 parent ad56977 commit 0a4807b

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

include/swift/AST/TypeMatcher.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -397,12 +397,10 @@ class TypeMatcher {
397397
return false;
398398
}
399399

400-
// If requested, compare the thrown error types.
400+
// Compare the thrown error types.
401401
Type thrownError1 = firstFunc->getEffectiveThrownErrorTypeOrNever();
402402
Type thrownError2 = secondFunc->getEffectiveThrownErrorTypeOrNever();
403-
if (Matcher.asDerived().considerThrownErrorTypes(thrownError1,
404-
thrownError2) &&
405-
!this->visit(thrownError1->getCanonicalType(),
403+
if (!this->visit(thrownError1->getCanonicalType(),
406404
thrownError2, thrownError1))
407405
return false;
408406

@@ -567,10 +565,6 @@ class TypeMatcher {
567565
return MatchVisitor(*this).visit(first->getCanonicalType(), second,
568566
first);
569567
}
570-
571-
bool considerThrownErrorTypes(Type errorType1, Type errorType2) const {
572-
return false;
573-
}
574568
};
575569

576570
} // end namespace swift

lib/Sema/TypeCheckProtocolInference.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -752,10 +752,6 @@ AssociatedTypeInference::inferTypeWitnessesViaValueWitness(ValueDecl *req,
752752
TypeBase *secondType, Type sugaredFirstType) {
753753
return true;
754754
}
755-
756-
bool considerThrownErrorTypes(Type errorType1, Type errorType2) const {
757-
return errorType1->hasTypeParameter();
758-
}
759755
};
760756

761757
// Match a requirement and witness type.

0 commit comments

Comments
 (0)