@@ -92,11 +92,6 @@ ConstraintGraph::lookupNode(TypeVariableType *typeVar) {
9292 if (typeVar != typeVarRep)
9393 mergeNodes (typeVar, typeVarRep);
9494 else if (auto fixed = CS.getFixedType (typeVarRep)) {
95- // FIXME: This is totally the wrong place to do it. We should do this in
96- // introduceToInference().
97- if (CS.isRecordingChanges ())
98- CS.recordChange (SolverTrail::Change::introducedToInference (typeVar, fixed));
99-
10095 // Bind the type variable.
10196 bindTypeVariable (typeVar, fixed);
10297 }
@@ -381,24 +376,6 @@ void ConstraintGraphNode::introduceToInference(Type fixedType) {
381376 }
382377}
383378
384- void ConstraintGraphNode::retractFromInference (Type fixedType) {
385- // Notify referencing variables (just like in bound case) that this
386- // type variable has been modified.
387- notifyReferencingVars ();
388-
389- SmallPtrSet<TypeVariableType *, 4 > referencedVars;
390- fixedType->getTypeVariables (referencedVars);
391-
392- // TODO: This might be an overkill but it's (currently)
393- // the simplest way to reliably ensure that all of the
394- // no longer related constraints have been retracted.
395- for (auto *referencedVar : referencedVars) {
396- auto &node = CG[referencedVar];
397- if (node.forRepresentativeVar ())
398- node.resetBindingSet ();
399- }
400- }
401-
402379void ConstraintGraphNode::resetBindingSet () {
403380 assert (forRepresentativeVar ());
404381
@@ -585,10 +562,6 @@ void ConstraintGraph::unrelateTypeVariables(TypeVariableType *typeVar,
585562 node.removeReference (otherTypeVar);
586563}
587564
588- void ConstraintGraph::retractFromInference (TypeVariableType *typeVar, Type fixed) {
589- (*this )[typeVar].retractFromInference (fixed);
590- }
591-
592565void ConstraintGraph::inferBindings (TypeVariableType *typeVar,
593566 Constraint *constraint) {
594567 (*this )[typeVar].getCurrentBindings ().infer (constraint);
0 commit comments