Hi
I'm using enum and wanted to write an extension to expose additional case values. Just confirming that this is not possible in Swift 5.1. I was thinking something like:
import CryptoKit
extension CryptoKitError {
enum `Self` : Error {
/// The data used to deserialized a key with `SecKeyCreateWithData` was incorrect.
case incorrectKeyData
/// The generation of the failed.
case keyFailure
}
}
The closest usage I example is:
throw CryptoKitError.Self.keyFailure
What I'd really want is:
throw CryptoKitError.keyFailure
Thanks