mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CSFix] Allow diagnose to accept a solution to diagnose
Instead of always applying solution back to constraint system before diagnostics, let's pass solution directly to `ConstaintFix::diagnose` method to be used by `FailureDiagnostic` which paves a way for stateless diagnostics.
This commit is contained in:
@@ -7326,7 +7326,8 @@ bool ConstraintSystem::applySolutionFixes(const Solution &solution) {
|
||||
auto *primaryFix = fixes[0];
|
||||
ArrayRef<ConstraintFix *> secondaryFixes{fixes.begin() + 1, fixes.end()};
|
||||
|
||||
auto diagnosed = primaryFix->coalesceAndDiagnose(secondaryFixes);
|
||||
auto diagnosed =
|
||||
primaryFix->coalesceAndDiagnose(solution, secondaryFixes);
|
||||
if (primaryFix->isWarning()) {
|
||||
assert(diagnosed && "warnings should always be diagnosed");
|
||||
(void)diagnosed;
|
||||
|
||||
Reference in New Issue
Block a user