Skip to content

Commit ee71e92

Browse files
committed
[ConstraintSystem] Add missing ApplyArgument contraction in subscript expression path
1 parent e2634ab commit ee71e92

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/Sema/CSDiag.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ void constraints::simplifyLocator(Expr *&anchor,
142142
continue;
143143
}
144144

145+
if (auto subscriptExpr = dyn_cast<SubscriptExpr>(anchor)) {
146+
anchor = subscriptExpr->getIndex();
147+
path = path.slice(1);
148+
continue;
149+
}
150+
145151
if (auto objectLiteralExpr = dyn_cast<ObjectLiteralExpr>(anchor)) {
146152
targetAnchor = nullptr;
147153
targetPath.clear();

0 commit comments

Comments
 (0)