File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
branches/master-next/lib/Sema Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3
- refs/heads/master-next: 881f521958be6f19e1d3ef505765f77840b026b4
3
+ refs/heads/master-next: b8528cd5750a95779411863747f4babbc8072164
4
4
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
5
5
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
6
6
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07
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