@@ -2831,12 +2831,6 @@ class ConstraintSystem {
28312831 // / Whether the bindings of this type involve other type variables.
28322832 bool InvolvesTypeVariables = false ;
28332833
2834- // / Whether the bindings represent (potentially) incomplete set,
2835- // / there is no way to say with absolute certainty if that's the
2836- // / case, but that could happen when certain constraints like
2837- // / `bind param` are present in the system.
2838- bool PotentiallyIncomplete = false ;
2839-
28402834 // / Whether this type variable has literal bindings.
28412835 LiteralBindingKind LiteralBinding = LiteralBindingKind::None;
28422836
@@ -2881,14 +2875,9 @@ class ConstraintSystem {
28812875 if (formBindingScore (y) < formBindingScore (x))
28822876 return false ;
28832877
2884- // If there is a difference in number of default types,
2878+ // If the only difference is default types,
28852879 // prioritize bindings with fewer of them.
2886- if (x.NumDefaultableBindings != y.NumDefaultableBindings )
2887- return x.NumDefaultableBindings < y.NumDefaultableBindings ;
2888-
2889- // As a last resort, let's check if the bindings are
2890- // potentially incomplete, and if so, let's de-prioritize them.
2891- return x.PotentiallyIncomplete < y.PotentiallyIncomplete ;
2880+ return x.NumDefaultableBindings < y.NumDefaultableBindings ;
28922881 }
28932882
28942883 void foundLiteralBinding (ProtocolDecl *proto) {
@@ -2921,8 +2910,6 @@ class ConstraintSystem {
29212910 void dump (llvm::raw_ostream &out,
29222911 unsigned indent = 0 ) const LLVM_ATTRIBUTE_USED {
29232912 out.indent (indent);
2924- if (PotentiallyIncomplete)
2925- out << " potentially_incomplete " ;
29262913 if (FullyBound)
29272914 out << " fully_bound " ;
29282915 if (SubtypeOfExistentialType)
0 commit comments