I would like to loop over an enum
that was originally defined in Objective-C using Swift.
The Objective-C definition is now as follows:
typedef NS_ENUM(NSInteger, Enum) { A, B, C };
If I try for e in Enum
I get this error message from the Swift compiler (in Xcode 6.1.1):
Type 'Enum.Type' does not conform to protocol Sequence.Type
What is missing? How can I let this enum behave as a sequence, if that's possible?