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:
@@ -15953,8 +15953,8 @@ ConstraintSystem::addKeyPathApplicationRootConstraint(Type root, ConstraintLocat
|
||||
if (!typeVar)
|
||||
return;
|
||||
|
||||
auto constraints = CG.gatherConstraints(
|
||||
typeVar, ConstraintGraph::GatheringKind::EquivalenceClass,
|
||||
auto constraints = CG.gatherNearbyConstraints(
|
||||
typeVar,
|
||||
[&keyPathExpr](Constraint *constraint) -> bool {
|
||||
if (constraint->getKind() != ConstraintKind::KeyPath)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user