mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Sema: Split up gatherConstraints() into gatherAllConstraints() and gatherNearbyConstraints()
The two GatherKinds no longer share any implementation, so there's no point keeping the logic together. Doing this also allows removing the acceptConstraintFn from gatherAllConstraints(), which further simplifies depthFirstSearch().
This commit is contained in:
@@ -267,8 +267,7 @@ void ConstraintSystem::assignFixedType(TypeVariableType *typeVar, Type type,
|
||||
void ConstraintSystem::addTypeVariableConstraintsToWorkList(
|
||||
TypeVariableType *typeVar) {
|
||||
// Activate the constraints affected by a change to this type variable.
|
||||
auto gatheringKind = ConstraintGraph::GatheringKind::AllMentions;
|
||||
for (auto *constraint : CG.gatherConstraints(typeVar, gatheringKind))
|
||||
for (auto *constraint : CG.gatherAllConstraints(typeVar))
|
||||
if (!constraint->isActive())
|
||||
activateConstraint(constraint);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user