We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41958f9 commit 6f3e2eeCopy full SHA for 6f3e2ee
lib/Sema/CSSimplify.cpp
@@ -7802,6 +7802,12 @@ ConstraintSystem::simplifyKeyPathApplicationConstraint(
7802
return SolutionKind::Unsolved;
7803
};
7804
7805
+ // When locator points to a KeyPathDynamicMemberLookup, skip the
7806
+ // key path application.
7807
+ if (locator.getBaseLocator()->isForKeyPathDynamicMemberLookup()) {
7808
+ return SolutionKind::Error;
7809
+ }
7810
+
7811
if (auto clas = keyPathTy->getAs<NominalType>()) {
7812
if (clas->getDecl() == getASTContext().getAnyKeyPathDecl()) {
7813
// Read-only keypath, whose projected value is upcast to `Any?`.
0 commit comments