I am trying to create an inheritance for below enum
enum BankAuthError: String {
case authFailed = "AuthFailed"
case technicalError = "Unavailable"
case accountLocked = "Locked"
case unknownError = "UnknownError"
case userInteractionRequired = "UserInteractionNeeded"
case realmUserAlreadyConnected = "UserExists"
}
I am able to use this enum as below
let errorCode = BankAuthError(rawValue:errorMessageCodeString)
Now I am trying to create inheritance from above struct as below
//MARK:- Enum to handle all sysnc errors
enum SyncErrorStatus: BankAuthError {
case usernameOrPasswordMissing = "UsernameOrPasswordMissing"
case signatureMissing = "SignatureMissing"
case twoPhaseAuthentication = "TwoPhaseAuth"
}
But if I am doing this, I am getting the compiler error as
'SyncErrorStatus' declares raw type 'BankAuthError', but does not conform to RawRepresentable and conformance could not be synthesized
Please let me know whether can we create inheritance from above Raw enum or not.