@@ -68,14 +68,13 @@ public Argument Arg(SyntaxNode? syntax, BindingTask<BoundLvalue> lvalue, Diagnos
6868 /// <param name="diagnostics">The bag to report diagnostics to.</param>
6969 public void Solve ( DiagnosticBag diagnostics )
7070 {
71- var solver = new DefinitionOrderSolver ( this . ConstructRules ( diagnostics ) ) ;
72- solver . Solve ( this . constraintStore ) ;
71+ while ( this . ApplyRulesOnce ( ) ) { }
7372
7473 // Check for uninferred locals
7574 this . CheckForUninferredLocals ( diagnostics ) ;
7675
7776 // And for failed inference
78- this . CheckForIncompleteInference ( diagnostics , solver ) ;
77+ this . CheckForIncompleteInference ( diagnostics ) ;
7978 }
8079
8180 private void CheckForUninferredLocals ( DiagnosticBag diagnostics )
@@ -94,7 +93,7 @@ private void CheckForUninferredLocals(DiagnosticBag diagnostics)
9493 }
9594 }
9695
97- private void CheckForIncompleteInference ( DiagnosticBag diagnostics , IChrSolver solver )
96+ private void CheckForIncompleteInference ( DiagnosticBag diagnostics )
9897 {
9998 var inferenceFailed = this . constraintStore . Count > 0
10099 || this . typeVariables . Select ( t => t . Substitution ) . Any ( t => t . IsTypeVariable ) ;
@@ -106,7 +105,7 @@ private void CheckForIncompleteInference(DiagnosticBag diagnostics, IChrSolver s
106105 location : InferDiagnosticTargetSyntax ( this . Context . DeclaringSyntax ) ? . Location ,
107106 formatArgs : this . ContextName ) ) ;
108107
109- this . FailRemainingRules ( solver ) ;
108+ this . FailRemainingRules ( ) ;
110109 }
111110
112111 /// <summary>
0 commit comments