[ConstraintSystem] Look through ArgumentAttribute element when computing a callee

This element is used purely for diagnostic purposes and locator
should behavior as if it's completely transparent.

(cherry picked from commit 622475bf15)
This commit is contained in:
Pavel Yaskevich
2025-06-05 22:24:16 -07:00
parent 4051ea2e78
commit 3ca6228246

View File

@@ -730,7 +730,9 @@ ConstraintLocator *ConstraintSystem::getCalleeLocator(
}
if (locator->isLastElement<LocatorPathElt::ArgumentAttribute>()) {
return getConstraintLocator(anchor, path.drop_back());
auto argLoc = getConstraintLocator(anchor, path.drop_back());
return getCalleeLocator(argLoc, lookThroughApply, getType, simplifyType,
getOverloadFor);
}
// If we have a locator that starts with a key path component element, we