File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1622,6 +1622,22 @@ static std::string getAtomLiteralAsString(ExprKind EK) {
1622
1622
#undef ENTRY
1623
1623
}
1624
1624
1625
+ // / Return string for collection literal kinds (interpolated string, array,
1626
+ // / dictionary) for printing in debug output.
1627
+ static std::string getCollectionLiteralAsString (KnownProtocolKind KPK) {
1628
+ #define ENTRY (Kind, String ) \
1629
+ case KnownProtocolKind::Kind: \
1630
+ return String
1631
+ switch (KPK) {
1632
+ ENTRY (ExpressibleByDictionaryLiteral, " dictionary" );
1633
+ ENTRY (ExpressibleByArrayLiteral, " array" );
1634
+ ENTRY (ExpressibleByStringInterpolation, " interpolated string" );
1635
+ default :
1636
+ return " " ;
1637
+ }
1638
+ #undef ENTRY
1639
+ }
1640
+
1625
1641
void BindingSet::dump (TypeVariableType *typeVar, llvm::raw_ostream &out,
1626
1642
unsigned indent) const {
1627
1643
out.indent (indent);
You can’t perform that action at this time.
0 commit comments