File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -10332,7 +10332,9 @@ static ConstraintFix *fixMemberRef(
1033210332 return fix;
1033310333 }
1033410334
10335- if (locator->isForKeyPathDynamicMemberLookup()) {
10335+ if (locator->isForKeyPathDynamicMemberLookup() ||
10336+ locator->isForKeyPathComponent() ||
10337+ locator->isKeyPathSubscriptComponent()) {
1033610338 if (auto *fix = AllowInvalidRefInKeyPath::forRef(cs, decl, locator))
1033710339 return fix;
1033810340 }
@@ -12303,11 +12305,9 @@ ConstraintSystem::simplifyKeyPathConstraint(
1230312305
1230412306 auto storage = dyn_cast<AbstractStorageDecl>(choice.getDecl());
1230512307
12306- if (auto *fix = AllowInvalidRefInKeyPath::forRef(
12307- *this, choice.getDecl(), calleeLoc)) {
12308- if (!hasFixFor(calleeLoc, FixKind::AllowTypeOrInstanceMember))
12309- if (!shouldAttemptFixes() || recordFix(fix))
12310- return SolutionKind::Error;
12308+ if (hasFixFor(calleeLoc, FixKind::AllowInvalidRefInKeyPath)) {
12309+ if (!shouldAttemptFixes())
12310+ return SolutionKind::Error;
1231112311
1231212312 // If this was a method reference let's mark it as read-only.
1231312313 if (!storage) {
You can’t perform that action at this time.
0 commit comments