Skip to content

Commit 3f78f4d

Browse files
committed
[CSFix] Diagnose multiple solutions with missing closure param as un-ambiguous
If there are multiple overloads and all of them require closure to have a parameter, let's diagnose that as such instead of ambiguity.
1 parent 9218ca0 commit 3f78f4d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/swift/Sema/CSFix.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2282,6 +2282,10 @@ class SpecifyClosureParameterType final : public ConstraintFix {
22822282

22832283
bool diagnose(const Solution &solution, bool asNote = false) const override;
22842284

2285+
bool diagnoseForAmbiguity(CommonFixesArray commonFixes) const override {
2286+
return diagnose(*commonFixes.front().first);
2287+
}
2288+
22852289
static SpecifyClosureParameterType *create(ConstraintSystem &cs,
22862290
ConstraintLocator *locator);
22872291

0 commit comments

Comments
 (0)