mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Diagnostics] In DefineMemberBasedOnUse::diagnoseForAmbiguity, use
the base type from each solution instead of only the base type from the first solution.
This commit is contained in:
@@ -2983,8 +2983,9 @@ bool ConstraintSystem::diagnoseAmbiguityWithFixes(
|
||||
bool diagnosed = false;
|
||||
for (auto fixes: aggregatedFixes) {
|
||||
// A common fix must appear in all solutions
|
||||
if (fixes.second.size() < solutions.size()) continue;
|
||||
diagnosed |= fixes.second.front()->diagnoseForAmbiguity(solutions);
|
||||
if (fixes.second.size() != solutions.size()) continue;
|
||||
diagnosed |= fixes.second.front()->diagnoseForAmbiguity(solutions,
|
||||
fixes.second);
|
||||
}
|
||||
return diagnosed;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user