@@ -347,8 +347,8 @@ void ConstraintSystem::applySolution(const Solution &solution) {
347
347
}
348
348
349
349
// Register the defaulted type variables.
350
- DefaultedConstraints. insert ( solution.DefaultedConstraints . begin (),
351
- solution. DefaultedConstraints . end () );
350
+ for ( auto *locator : solution.DefaultedConstraints )
351
+ recordDefaultedConstraint (locator );
352
352
353
353
// Add the node types back.
354
354
for (auto &nodeType : solution.nodeTypes ) {
@@ -663,7 +663,6 @@ ConstraintSystem::SolverScope::SolverScope(ConstraintSystem &cs)
663
663
664
664
numTypeVariables = cs.TypeVariables .size ();
665
665
numFixes = cs.Fixes .size ();
666
- numDefaultedConstraints = cs.DefaultedConstraints .size ();
667
666
numAddedNodeTypes = cs.addedNodeTypes .size ();
668
667
numAddedKeyPathComponentTypes = cs.addedKeyPathComponentTypes .size ();
669
668
numKeyPaths = cs.KeyPaths .size ();
@@ -719,9 +718,6 @@ ConstraintSystem::SolverScope::~SolverScope() {
719
718
// constraints introduced by the current scope.
720
719
cs.solverState ->rollback (this );
721
720
722
- // Remove any defaulted type variables.
723
- truncate (cs.DefaultedConstraints , numDefaultedConstraints);
724
-
725
721
// Remove any node types we registered.
726
722
for (unsigned i :
727
723
reverse (range (numAddedNodeTypes, cs.addedNodeTypes .size ()))) {
0 commit comments