@@ -399,7 +399,7 @@ void ConstraintGraph::addConstraint(Constraint *constraint) {
399
399
auto referencedTypeVars = constraint->getTypeVariables ();
400
400
for (auto typeVar : referencedTypeVars) {
401
401
// Record the change, if there are active scopes.
402
- if (CS.isRecordingChanges () )
402
+ if (CS.solverState )
403
403
CS.recordChange (SolverTrail::Change::AddedConstraint (typeVar, constraint));
404
404
405
405
addConstraint (typeVar, constraint);
@@ -419,7 +419,7 @@ void ConstraintGraph::addConstraint(Constraint *constraint) {
419
419
// track it as such.
420
420
if (referencedTypeVars.empty ()) {
421
421
// Record the change, if there are active scopes.
422
- if (CS.isRecordingChanges () )
422
+ if (CS.solverState )
423
423
CS.recordChange (SolverTrail::Change::AddedConstraint (nullptr , constraint));
424
424
425
425
addConstraint (nullptr , constraint);
@@ -454,7 +454,7 @@ void ConstraintGraph::removeConstraint(Constraint *constraint) {
454
454
}
455
455
456
456
// Record the change, if there are active scopes.
457
- if (CS.isRecordingChanges () )
457
+ if (CS.solverState )
458
458
CS.recordChange (SolverTrail::Change::RemovedConstraint (typeVar, constraint));
459
459
460
460
removeConstraint (typeVar, constraint);
@@ -463,7 +463,7 @@ void ConstraintGraph::removeConstraint(Constraint *constraint) {
463
463
// If this is an orphaned constraint, remove it from the list.
464
464
if (referencedTypeVars.empty ()) {
465
465
// Record the change, if there are active scopes.
466
- if (CS.isRecordingChanges () )
466
+ if (CS.solverState )
467
467
CS.recordChange (SolverTrail::Change::RemovedConstraint (nullptr , constraint));
468
468
469
469
removeConstraint (nullptr , constraint);
0 commit comments