Skip to content

Commit 40fba5f

Browse files
committed
[CS] Fix locator simplification with 'Member' path element
1 parent f3ea951 commit 40fba5f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5447,6 +5447,15 @@ void constraints::simplifyLocator(ASTNode &anchor,
54475447
LLVM_FALLTHROUGH;
54485448

54495449
case ConstraintLocator::Member:
5450+
if (auto UDE = getAsExpr<UnresolvedDotExpr>(anchor)) {
5451+
path = path.slice(1);
5452+
continue;
5453+
}
5454+
if (anchor.is<Pattern *>()) {
5455+
path = path.slice(1);
5456+
continue;
5457+
}
5458+
break;
54505459
case ConstraintLocator::MemberRefBase:
54515460
if (auto UDE = getAsExpr<UnresolvedDotExpr>(anchor)) {
54525461
range = UDE->getNameLoc().getSourceRange();

0 commit comments

Comments
 (0)