Skip to content

Commit 3064594

Browse files
committed
[ConstraintSystem] Handle simplifying function result locator path
elements when the anchor is an unapplied decl reference in simplifyLocator. In this case, there's nothing to extract, so simply remove the path element and continue on.
1 parent fc6f9e0 commit 3064594

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4327,6 +4327,12 @@ void constraints::simplifyLocator(ASTNode &anchor,
43274327
continue;
43284328
}
43294329

4330+
// If the anchor is an unapplied decl ref, there's nothing to extract.
4331+
if (isExpr<DeclRefExpr>(anchor) || isExpr<OverloadedDeclRefExpr>(anchor)) {
4332+
path = path.slice(1);
4333+
continue;
4334+
}
4335+
43304336
break;
43314337

43324338
case ConstraintLocator::AutoclosureResult:

0 commit comments

Comments
 (0)