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) {
16221622#undef ENTRY
16231623}
16241624
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+
16251641void BindingSet::dump (TypeVariableType *typeVar, llvm::raw_ostream &out,
16261642 unsigned indent) const {
16271643 out.indent (indent);
You can’t perform that action at this time.
0 commit comments