Skip to content

Commit 88e2484

Browse files
committed
[ConstraintSystem] Fix isPartialApplication to handle unappled operator references
1 parent 00eee36 commit 88e2484

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2644,6 +2644,11 @@ bool ConstraintSystem::isPartialApplication(ConstraintLocator *locator) {
26442644
locator->findFirst<LocatorPathElt::ImplicitConversion>())
26452645
return false;
26462646

2647+
if (locator->directlyAt<OverloadedDeclRefExpr>()) {
2648+
auto *ODRE = castToExpr<OverloadedDeclRefExpr>(locator->getAnchor());
2649+
return ODRE->getFunctionRefKind() == FunctionRefKind::Unapplied;
2650+
}
2651+
26472652
auto *UDE = getAsExpr<UnresolvedDotExpr>(locator->getAnchor());
26482653
if (UDE == nullptr)
26492654
return false;

0 commit comments

Comments
 (0)