File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -551,8 +551,11 @@ ConstraintSystem::getPotentialBindings(TypeVariableType *typeVar) const {
551
551
if (result.FullyBound )
552
552
continue ;
553
553
554
- // If this variable is in the application projected result type, it is
555
- // fully bound.
554
+ // If this variable is in the application projected result type, mark the
555
+ // result as `FullyBound` to ensure we delay binding until we've bound
556
+ // other type variables in the KeyPathApplication constraint. This ensures
557
+ // we try to bind the key path type first, which can allow us to discover
558
+ // additional bindings for the result type.
556
559
SmallPtrSet<TypeVariableType *, 4 > typeVars;
557
560
findInferableTypeVars (simplifyType (constraint->getThirdType ()), typeVars);
558
561
if (typeVars.count (typeVar))
You can’t perform that action at this time.
0 commit comments