@@ -1150,14 +1150,6 @@ std::optional<BindingSet> ConstraintSystem::determineBestBindings(
11501150 auto isViableForRanking = [this ](const BindingSet &bindings) -> bool {
11511151 auto *typeVar = bindings.getTypeVariable ();
11521152
1153- // Type variable representing a base of unresolved member chain should
1154- // always be considered viable for ranking since it's allow to infer
1155- // types from transitive protocol requirements.
1156- if (auto *locator = typeVar->getImpl ().getLocator ()) {
1157- if (locator->isLastElement <LocatorPathElt::MemberRefBase>())
1158- return true ;
1159- }
1160-
11611153 // If type variable is marked as a potential hole there is always going
11621154 // to be at least one binding available for it.
11631155 if (shouldAttemptFixes () && typeVar->getImpl ().canBindToHole ())
@@ -1180,6 +1172,11 @@ std::optional<BindingSet> ConstraintSystem::determineBestBindings(
11801172 if (!bindings.finalizeKeyPathBindings ())
11811173 continue ;
11821174
1175+ // Special handling for "leading-dot" unresolved member references,
1176+ // like .foo.
1177+ bindings.inferTransitiveUnresolvedMemberRefBindings ();
1178+ bindings.finalizeUnresolvedMemberChainResult ();
1179+
11831180 // Before attempting to infer transitive bindings let's check
11841181 // whether there are any viable "direct" bindings associated with
11851182 // current type variable, if there are none - it means that this type
@@ -1194,11 +1191,6 @@ std::optional<BindingSet> ConstraintSystem::determineBestBindings(
11941191
11951192 bindings.inferTransitiveSupertypeBindings ();
11961193
1197- // Special handling for "leading-dot" unresolved member references,
1198- // like .foo.
1199- bindings.inferTransitiveUnresolvedMemberRefBindings ();
1200- bindings.finalizeUnresolvedMemberChainResult ();
1201-
12021194 bindings.determineLiteralCoverage ();
12031195
12041196 if (!bindings.hasViableBindings () && !bindings.isDirectHole ())
0 commit comments