@@ -1321,6 +1321,7 @@ class OpenTypeSequenceElements {
1321
1321
// Match the argument of a call to the parameter.
1322
1322
ConstraintSystem::TypeMatchResult constraints::matchCallArguments (
1323
1323
ConstraintSystem &cs, FunctionType *contextualType,
1324
+ ArgumentList *argList,
1324
1325
ArrayRef<AnyFunctionType::Param> args,
1325
1326
ArrayRef<AnyFunctionType::Param> params, ConstraintKind subKind,
1326
1327
ConstraintLocatorBuilder locator,
@@ -1340,8 +1341,7 @@ ConstraintSystem::TypeMatchResult constraints::matchCallArguments(
1340
1341
1341
1342
ParameterListInfo paramInfo (params, callee, appliedSelf);
1342
1343
1343
- // Dig out the argument information.
1344
- auto *argList = cs.getArgumentList (loc);
1344
+ // Make sure that argument list is available.
1345
1345
assert (argList);
1346
1346
1347
1347
// Apply labels to arguments.
@@ -10634,11 +10634,14 @@ ConstraintSystem::simplifyApplicableFnConstraint(
10634
10634
? ConstraintKind::OperatorArgumentConversion
10635
10635
: ConstraintKind::ArgumentConversion);
10636
10636
10637
+ auto *argumentsLoc = getConstraintLocator (
10638
+ outerLocator.withPathElement (ConstraintLocator::ApplyArgument));
10639
+
10640
+ auto *argumentList = getArgumentList (argumentsLoc);
10637
10641
// The argument type must be convertible to the input type.
10638
10642
auto matchCallResult = ::matchCallArguments (
10639
- *this , func2, func1->getParams (), func2->getParams (), subKind,
10640
- outerLocator.withPathElement (ConstraintLocator::ApplyArgument),
10641
- trailingClosureMatching);
10643
+ *this , func2, argumentList, func1->getParams (), func2->getParams (),
10644
+ subKind, argumentsLoc, trailingClosureMatching);
10642
10645
10643
10646
switch (matchCallResult) {
10644
10647
case SolutionKind::Error:
0 commit comments