mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Function builders] Fake Expr-based locators for now.
The right solution is to extend the notion of the "anchor" of a locator to also cover statements (and TypeReprs, and Patterns, and more), so this is a stop-gap.
This commit is contained in:
@@ -3653,13 +3653,14 @@ ConstraintSystem::getFunctionArgApplyInfo(ConstraintLocator *locator) {
|
||||
assert(!shouldHaveDirectCalleeOverload(call) &&
|
||||
"Should we have resolved a callee for this?");
|
||||
rawFnType = getType(call->getFn());
|
||||
} else {
|
||||
} else if (auto *apply = dyn_cast<ApplyExpr>(anchor)) {
|
||||
// FIXME: ArgumentMismatchFailure is currently used from CSDiag, meaning
|
||||
// we can end up a BinaryExpr here with an unresolved callee. It should be
|
||||
// possible to remove this once we've gotten rid of the old CSDiag logic
|
||||
// and just assert that we have a CallExpr.
|
||||
auto *apply = cast<ApplyExpr>(anchor);
|
||||
rawFnType = getType(apply->getFn());
|
||||
} else {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user