Skip to content

Instantly share code, notes, and snippets.

@vialyx
Last active February 19, 2018 13:14
Show Gist options
  • Save vialyx/47bb5fd138a343de412d24c9fb88d2d5 to your computer and use it in GitHub Desktop.
Save vialyx/47bb5fd138a343de412d24c9fb88d2d5 to your computer and use it in GitHub Desktop.
enum EventType: Int {
case shared = 0
case personal
case group
}
let type = EventType(rawValue: -1)
// type is inferred to be of type "EventType?", or "optional EventType"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment