mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CS] Allow getCalleeLocator to find key path component callees
In order to do this we need it to take a ConstraintLocator argument so we can tell which component we want the callee for. To make it clear that we're looking for a callee at the anchor, also rename the member to getAnchormostCalleeLocator.
This commit is contained in:
@@ -4243,11 +4243,11 @@ namespace {
|
||||
|
||||
auto locator = cs.getConstraintLocator(
|
||||
E, LocatorPathElt::KeyPathComponent(i));
|
||||
if (kind == KeyPathExpr::Component::Kind::UnresolvedSubscript) {
|
||||
locator =
|
||||
cs.getConstraintLocator(locator,
|
||||
ConstraintLocator::SubscriptMember);
|
||||
}
|
||||
|
||||
// Adjust the locator such that it includes any additional elements to
|
||||
// point to the component's callee, e.g a SubscriptMember for a
|
||||
// subscript component.
|
||||
locator = cs.getAnchormostCalleeLocator(locator);
|
||||
|
||||
bool isDynamicMember = false;
|
||||
// If this is an unresolved link, make sure we resolved it.
|
||||
|
||||
Reference in New Issue
Block a user