mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ConstraintSystem] Allow to use keypath dynamic member lookup inside keypath expressions
This commit is contained in:
@@ -1912,7 +1912,7 @@ void ConstraintSystem::resolveOverload(ConstraintLocator *locator,
|
||||
auto memberTy = createTypeVariable(keyPathLoc, TVO_CanBindToLValue);
|
||||
// Attempt to lookup a member with a give name in the root type and
|
||||
// assign result to the leaf type of the keypath.
|
||||
bool isSubscriptRef = isa<SubscriptExpr>(locator->getAnchor());
|
||||
bool isSubscriptRef = locator->isSubscriptMemberRef();
|
||||
DeclName memberName =
|
||||
isSubscriptRef ? DeclBaseName::createSubscript() : choice.getName();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user