File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -575,6 +575,7 @@ matchCallArguments(ArrayRef<AnyFunctionType::Param> args,
575
575
576
576
// If we have any unfulfilled parameters, check them now.
577
577
if (haveUnfulfilledParams) {
578
+ bool hasSynthesizedArgs = false ;
578
579
for (paramIdx = 0 ; paramIdx != numParams; ++paramIdx) {
579
580
// If we have a binding for this parameter, we're done.
580
581
if (!parameterBindings[paramIdx].empty ())
@@ -590,16 +591,19 @@ matchCallArguments(ArrayRef<AnyFunctionType::Param> args,
590
591
if (paramInfo.hasDefaultArgument (paramIdx))
591
592
continue ;
592
593
593
- if (potentiallyOutOfOrder)
594
- return true ;
595
-
596
594
if (auto newArgIdx = listener.missingArgument (paramIdx)) {
597
595
parameterBindings[paramIdx].push_back (*newArgIdx);
596
+ hasSynthesizedArgs = true ;
598
597
continue ;
599
598
}
600
599
601
600
return true ;
602
601
}
602
+
603
+ // If all of the missing arguments have been synthesized,
604
+ // let's stop since we have found the problem.
605
+ if (hasSynthesizedArgs)
606
+ return false ;
603
607
}
604
608
605
609
// If any arguments were provided out-of-order, check whether we have
You can’t perform that action at this time.
0 commit comments