Consider two Swift lines:
enum Foo: Int { case bar } @objc enum Baz: Int { case qux }
If I were to print each case these enumerations, I would expect the same result. Instead, I see something unexpected:
print(Foo.bar) // "bar\n" print(Baz.qux) // "Baz\n"
Why @objc printing a case with @objc enum print an enumeration name, and when printing a case pure Swift, enumerate the actual name of the case ? Does @objc debug description?
source share