@@ -636,8 +636,6 @@ void BindingSet::determineLiteralCoverage() {
636
636
if (Literals.empty ())
637
637
return ;
638
638
639
- SmallVector<PotentialBinding, 4 > adjustedBindings;
640
-
641
639
bool allowsNil = canBeNil ();
642
640
643
641
for (auto &entry : Literals) {
@@ -648,7 +646,6 @@ void BindingSet::determineLiteralCoverage() {
648
646
649
647
for (auto binding = Bindings.begin (); binding != Bindings.end ();
650
648
++binding) {
651
-
652
649
bool isCovered = false ;
653
650
Type adjustedTy;
654
651
@@ -1710,7 +1707,7 @@ void BindingSet::dump(llvm::raw_ostream &out, unsigned indent) const {
1710
1707
}
1711
1708
case LiteralBindingKind::Float:
1712
1709
case LiteralBindingKind::None:
1713
- out << getLiteralBindingKind (literalKind).str ();
1710
+ out << getLiteralBindingKind (literalKind).str ();
1714
1711
break ;
1715
1712
}
1716
1713
if (attributes.empty ()) {
@@ -1755,8 +1752,20 @@ void BindingSet::dump(llvm::raw_ostream &out, unsigned indent) const {
1755
1752
1756
1753
out << " [with possible bindings: " ;
1757
1754
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 ()) {
1759
1767
out << " <empty>" ;
1768
+ }
1760
1769
out << " ]" ;
1761
1770
1762
1771
if (!Defaults.empty ()) {
0 commit comments