Skip to content

Commit f185bed

Browse files
committed
[CS] Fix locator simplification with 'Member' path element
1 parent df82e54 commit f185bed

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
@@ -5444,6 +5444,15 @@ void constraints::simplifyLocator(ASTNode &anchor,
54445444
LLVM_FALLTHROUGH;
54455445

54465446
case ConstraintLocator::Member:
5447+
if (auto UDE = getAsExpr<UnresolvedDotExpr>(anchor)) {
5448+
path = path.slice(1);
5449+
continue;
5450+
}
5451+
if (anchor.is<Pattern *>()) {
5452+
path = path.slice(1);
5453+
continue;
5454+
}
5455+
break;
54475456
case ConstraintLocator::MemberRefBase:
54485457
if (auto UDE = getAsExpr<UnresolvedDotExpr>(anchor)) {
54495458
range = UDE->getNameLoc().getSourceRange();

0 commit comments

Comments
 (0)