@@ -513,7 +513,7 @@ void BindingSet::inferTransitiveBindings() {
513513 auto bindingTy = binding.BindingType ->lookThroughAllOptionalTypes ();
514514
515515 Type inferredRootTy;
516- if (isKnownKeyPathType (bindingTy )) {
516+ if (bindingTy-> isKnownKeyPathType ()) {
517517 // AnyKeyPath doesn't have a root type.
518518 if (bindingTy->isAnyKeyPath ())
519519 continue ;
@@ -727,7 +727,8 @@ bool BindingSet::finalize(bool transitive) {
727727 for (const auto &binding : Bindings) {
728728 auto bindingTy = binding.BindingType ->lookThroughAllOptionalTypes ();
729729
730- assert (isKnownKeyPathType (bindingTy) || bindingTy->is <FunctionType>());
730+ assert (bindingTy->isKnownKeyPathType () ||
731+ bindingTy->is <FunctionType>());
731732
732733 // Functions don't have capability so we can simply add them.
733734 if (auto *fnType = bindingTy->getAs <FunctionType>()) {
@@ -1694,15 +1695,15 @@ PotentialBindings::inferFromRelational(ConstraintSystem &CS,
16941695 if (type->isExistentialType ()) {
16951696 auto layout = type->getExistentialLayout ();
16961697 if (auto superclass = layout.explicitSuperclass ) {
1697- if (isKnownKeyPathType (superclass )) {
1698+ if (superclass-> isKnownKeyPathType ()) {
16981699 type = superclass;
16991700 objectTy = superclass;
17001701 }
17011702 }
17021703 }
17031704 }
17041705
1705- if (!(isKnownKeyPathType (objectTy ) || objectTy->is <AnyFunctionType>()))
1706+ if (!(objectTy-> isKnownKeyPathType () || objectTy->is <AnyFunctionType>()))
17061707 return std::nullopt ;
17071708 }
17081709
0 commit comments