I have declared error type
enum UserServicesError: ErrorType {
case UserNotLogged
}
but I get an error
Argument type 'UserServicesError' does not conform to expected type 'ErrorType'
Type 'UserServicesError' does not conform to protocol 'RawRepresentable'
Any idea y? Official documentation says that this declaration is sufficient.
I've finally figure it out. I had declared enum ErrorType in objective-c shared class from pre-swift ages.
typedef NS_ENUM(NSUInteger, ErrorType) {
...
};
I would expect to see a Redefined type error
rather than does not conform to protocol 'RawRepresentable'