Skip to content

Commit 65e32d7

Browse files
author
Amritpan Kaur
committed
[CSBindings] Convert LiteralBindKind enum to String for use in printing type variable attributes.
1 parent c8db085 commit 65e32d7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

include/swift/Sema/CSBindings.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,18 @@ class BindingSet {
558558
/// Check whether the given binding set covers any of the
559559
/// literal protocols associated with this type variable.
560560
void determineLiteralCoverage();
561+
562+
StringRef getLiteralBindingKind(LiteralBindingKind K) const {
563+
#define ENTRY(Kind, String) case LiteralBindingKind::Kind: return String
564+
switch (K) {
565+
ENTRY(None, "none");
566+
ENTRY(Collection, "collection");
567+
ENTRY(Float, "float");
568+
ENTRY(Atom, "atom");
569+
}
570+
#undef ENTRY
571+
}
572+
561573
};
562574

563575
} // end namespace inference

0 commit comments

Comments
 (0)