mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #39192 from hamishknight/a-range-of-arguments
[CS] Store argument list mappings on solutions
This commit is contained in:
@@ -917,7 +917,7 @@ namespace {
|
||||
CS.getConstraintLocator(locator,
|
||||
ConstraintLocator::FunctionResult);
|
||||
|
||||
associateArgumentList(memberLocator, argList);
|
||||
CS.associateArgumentList(memberLocator, argList);
|
||||
|
||||
Type outputTy;
|
||||
|
||||
@@ -1174,7 +1174,7 @@ namespace {
|
||||
|
||||
Type visitObjectLiteralExpr(ObjectLiteralExpr *expr) {
|
||||
auto *exprLoc = CS.getConstraintLocator(expr);
|
||||
associateArgumentList(exprLoc, expr->getArgs());
|
||||
CS.associateArgumentList(exprLoc, expr->getArgs());
|
||||
|
||||
// If the expression has already been assigned a type; just use that type.
|
||||
if (expr->getType())
|
||||
@@ -2687,7 +2687,7 @@ namespace {
|
||||
Type visitApplyExpr(ApplyExpr *expr) {
|
||||
auto fnExpr = expr->getFn();
|
||||
|
||||
associateArgumentList(CS.getConstraintLocator(expr), expr->getArgs());
|
||||
CS.associateArgumentList(CS.getConstraintLocator(expr), expr->getArgs());
|
||||
|
||||
if (auto *UDE = dyn_cast<UnresolvedDotExpr>(fnExpr)) {
|
||||
auto typeOperation = getTypeOperation(UDE, CS.getASTContext());
|
||||
@@ -3442,11 +3442,6 @@ namespace {
|
||||
}
|
||||
llvm_unreachable("unhandled operation");
|
||||
}
|
||||
|
||||
void associateArgumentList(ConstraintLocator *locator, ArgumentList *args) {
|
||||
assert(locator && locator->getAnchor());
|
||||
CS.ArgumentLists[CS.getArgumentInfoLocator(locator)] = args;
|
||||
}
|
||||
};
|
||||
|
||||
class ConstraintWalker : public ASTWalker {
|
||||
|
||||
Reference in New Issue
Block a user