Created
September 19, 2016 07:00
-
-
Save mwrites/8230f85e9652ef232e63907bd6ed71e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum SvcError: ErrorType { | |
case Bla | |
case Blo | |
case Code(Int) | |
} | |
let e: ErrorType = SvcError.Code(3) | |
print(e) | |
if e is SvcError { | |
if let svcError = e as? SvcError, case let .Code(c) = svcError { | |
print(c) | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment