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(
10332
10332
return fix;
10333
10333
}
10334
10334
10335
- if (locator->isForKeyPathDynamicMemberLookup()) {
10335
+ if (locator->isForKeyPathDynamicMemberLookup() ||
10336
+ locator->isForKeyPathComponent() ||
10337
+ locator->isKeyPathSubscriptComponent()) {
10336
10338
if (auto *fix = AllowInvalidRefInKeyPath::forRef(cs, decl, locator))
10337
10339
return fix;
10338
10340
}
@@ -12303,11 +12305,9 @@ ConstraintSystem::simplifyKeyPathConstraint(
12303
12305
12304
12306
auto storage = dyn_cast<AbstractStorageDecl>(choice.getDecl());
12305
12307
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;
12311
12311
12312
12312
// If this was a method reference let's mark it as read-only.
12313
12313
if (!storage) {
You can’t perform that action at this time.
0 commit comments