Skip to content

Commit df27db1

Browse files
committed
[ConstraintSystem] NFC: Remove obsolete isPartialApplication
1 parent 05b0ada commit df27db1

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

include/swift/Sema/ConstraintSystem.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5609,8 +5609,6 @@ class ConstraintSystem {
56095609
return range.isValid() ? range : std::optional<SourceRange>();
56105610
}
56115611

5612-
bool isPartialApplication(ConstraintLocator *locator);
5613-
56145612
bool isTooComplex(size_t solutionMemory) {
56155613
if (isAlreadyTooComplex.first)
56165614
return true;

lib/Sema/ConstraintSystem.cpp

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2639,31 +2639,6 @@ static unsigned getApplicationLevel(ConstraintSystem &CS, Type baseTy,
26392639
return level;
26402640
}
26412641

2642-
bool ConstraintSystem::isPartialApplication(ConstraintLocator *locator) {
2643-
// If this is a compiler synthesized implicit conversion, let's skip
2644-
// the check because the base of `UDE` is not the base of the injected
2645-
// initializer.
2646-
if (locator->isLastElement<LocatorPathElt::ConstructorMember>() &&
2647-
locator->findFirst<LocatorPathElt::ImplicitConversion>())
2648-
return false;
2649-
2650-
if (locator->directlyAt<OverloadedDeclRefExpr>()) {
2651-
auto *ODRE = castToExpr<OverloadedDeclRefExpr>(locator->getAnchor());
2652-
return ODRE->getFunctionRefKind() == FunctionRefKind::Unapplied;
2653-
}
2654-
2655-
auto *UDE = getAsExpr<UnresolvedDotExpr>(locator->getAnchor());
2656-
if (UDE == nullptr)
2657-
return false;
2658-
2659-
auto baseTy =
2660-
simplifyType(getType(UDE->getBase()))->getWithoutSpecifierType();
2661-
auto level = getApplicationLevel(*this, baseTy, UDE);
2662-
// Static members have base applied implicitly which means that their
2663-
// application level is lower.
2664-
return level < (baseTy->is<MetatypeType>() ? 1 : 2);
2665-
}
2666-
26672642
bool IsInLeftHandSideOfAssignment::operator()(Expr *expr) const {
26682643
// Walk up the parent tree.
26692644
auto parent = cs.getParentExpr(expr);

0 commit comments

Comments
 (0)