@@ -636,8 +636,6 @@ void BindingSet::determineLiteralCoverage() {
636636 if (Literals.empty ())
637637 return ;
638638
639- SmallVector<PotentialBinding, 4 > adjustedBindings;
640-
641639 bool allowsNil = canBeNil ();
642640
643641 for (auto &entry : Literals) {
@@ -648,7 +646,6 @@ void BindingSet::determineLiteralCoverage() {
648646
649647 for (auto binding = Bindings.begin (); binding != Bindings.end ();
650648 ++binding) {
651-
652649 bool isCovered = false ;
653650 Type adjustedTy;
654651
@@ -1710,7 +1707,7 @@ void BindingSet::dump(llvm::raw_ostream &out, unsigned indent) const {
17101707 }
17111708 case LiteralBindingKind::Float:
17121709 case LiteralBindingKind::None:
1713- out << getLiteralBindingKind (literalKind).str ();
1710+ out << getLiteralBindingKind (literalKind).str ();
17141711 break ;
17151712 }
17161713 if (attributes.empty ()) {
@@ -1755,8 +1752,20 @@ void BindingSet::dump(llvm::raw_ostream &out, unsigned indent) const {
17551752
17561753 out << " [with possible bindings: " ;
17571754 interleave (Bindings, printBinding, [&]() { out << " ; " ; });
1758- if (Bindings.empty ())
1755+ if (!Literals.empty ()) {
1756+ std::vector<std::string> defaultLiterals;
1757+ for (const auto &literal : Literals) {
1758+ if (literal.second .viableAsBinding ()) {
1759+ auto defaultWithType = " (default type of literal) " +
1760+ literal.second .getDefaultType ().getString (PO);
1761+ defaultLiterals.push_back (defaultWithType);
1762+ }
1763+ }
1764+ interleave (defaultLiterals, out, " , " );
1765+ }
1766+ if (Bindings.empty () && Literals.empty ()) {
17591767 out << " <empty>" ;
1768+ }
17601769 out << " ]" ;
17611770
17621771 if (!Defaults.empty ()) {
0 commit comments