[CS] Resolve callees for key path dynamic members (#28807)

[CS] Resolve callees for key path dynamic members
This commit is contained in:
Hamish Knight
2019-12-16 17:52:22 -08:00
committed by GitHub
3 changed files with 55 additions and 6 deletions

View File

@@ -788,9 +788,7 @@ getCalleeDeclAndArgs(ConstraintSystem &cs,
// Our remaining path can only be 'ApplyArgument'.
auto path = callLocator->getPath();
if (!path.empty() &&
!(path.size() <= 2 &&
path.back().getKind() == ConstraintLocator::ApplyArgument))
if (!path.empty() && !path.back().is<LocatorPathElt::ApplyArgument>())
return formUnknownCallee();
// Dig out the callee information.