File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -6605,6 +6605,22 @@ bool ConstraintSystem::repairFailures(
6605
6605
conversionsOrFixes.push_back(fix);
6606
6606
return true;
6607
6607
}
6608
+ case ConstraintLocator::KeyPathValue: {
6609
+ if (lhs->isPlaceholder() || rhs->isPlaceholder())
6610
+ return true;
6611
+ if (lhs->isTypeVariableOrMember() || rhs->isTypeVariableOrMember())
6612
+ break;
6613
+
6614
+ auto kpExpr = castToExpr<KeyPathExpr>(anchor);
6615
+ auto i = kpExpr->getComponents().size() - 1;
6616
+ auto lastCompLoc =
6617
+ getConstraintLocator(kpExpr, LocatorPathElt::KeyPathComponent(i));
6618
+ if (hasFixFor(lastCompLoc, FixKind::AllowTypeOrInstanceMember))
6619
+ return true;
6620
+
6621
+ conversionsOrFixes.push_back(IgnoreContextualType::create(
6622
+ *this, lhs, rhs, getConstraintLocator(anchor)));
6623
+ }
6608
6624
default:
6609
6625
break;
6610
6626
}
You can’t perform that action at this time.
0 commit comments