Skip to content

Commit 622475b

Browse files
committed
[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.
1 parent 68524a8 commit 622475b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,9 @@ ConstraintLocator *ConstraintSystem::getCalleeLocator(
730730
}
731731

732732
if (locator->isLastElement<LocatorPathElt::ArgumentAttribute>()) {
733-
return getConstraintLocator(anchor, path.drop_back());
733+
auto argLoc = getConstraintLocator(anchor, path.drop_back());
734+
return getCalleeLocator(argLoc, lookThroughApply, getType, simplifyType,
735+
getOverloadFor);
734736
}
735737

736738
// If we have a locator that starts with a key path component element, we

0 commit comments

Comments
 (0)