@@ -513,7 +513,7 @@ void BindingSet::inferTransitiveBindings() {
513
513
auto bindingTy = binding.BindingType ->lookThroughAllOptionalTypes ();
514
514
515
515
Type inferredRootTy;
516
- if (isKnownKeyPathType (bindingTy )) {
516
+ if (bindingTy-> isKnownKeyPathType ()) {
517
517
// AnyKeyPath doesn't have a root type.
518
518
if (bindingTy->isAnyKeyPath ())
519
519
continue ;
@@ -727,7 +727,8 @@ bool BindingSet::finalize(bool transitive) {
727
727
for (const auto &binding : Bindings) {
728
728
auto bindingTy = binding.BindingType ->lookThroughAllOptionalTypes ();
729
729
730
- assert (isKnownKeyPathType (bindingTy) || bindingTy->is <FunctionType>());
730
+ assert (bindingTy->isKnownKeyPathType () ||
731
+ bindingTy->is <FunctionType>());
731
732
732
733
// Functions don't have capability so we can simply add them.
733
734
if (auto *fnType = bindingTy->getAs <FunctionType>()) {
@@ -1694,15 +1695,15 @@ PotentialBindings::inferFromRelational(ConstraintSystem &CS,
1694
1695
if (type->isExistentialType ()) {
1695
1696
auto layout = type->getExistentialLayout ();
1696
1697
if (auto superclass = layout.explicitSuperclass ) {
1697
- if (isKnownKeyPathType (superclass )) {
1698
+ if (superclass-> isKnownKeyPathType ()) {
1698
1699
type = superclass;
1699
1700
objectTy = superclass;
1700
1701
}
1701
1702
}
1702
1703
}
1703
1704
}
1704
1705
1705
- if (!(isKnownKeyPathType (objectTy ) || objectTy->is <AnyFunctionType>()))
1706
+ if (!(objectTy-> isKnownKeyPathType () || objectTy->is <AnyFunctionType>()))
1706
1707
return std::nullopt ;
1707
1708
}
1708
1709
0 commit comments