Skip to content

Instantly share code, notes, and snippets.

@ezura
Created July 10, 2017 14:04
Show Gist options
  • Save ezura/64ebb6d4a86bb5837ca006d9591bc539 to your computer and use it in GitHub Desktop.
Save ezura/64ebb6d4a86bb5837ca006d9591bc539 to your computer and use it in GitHub Desktop.
こう #swift #CodePiece
enum E<T: ExpressibleByIntegerLiteral>: T where T: Equatable {
case a = 1
}
// ...
let ei: E<Int> = .a
let et: E<MyType> = .a
let i: E<Int> = E<Int>.a.rawValue
let t: MyType = E<MyType>.a.rawValue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment