Last active
February 26, 2017 06:04
-
-
Save d-date/d1297541f288ea51bf5e34782709a250 to your computer and use it in GitHub Desktop.
This file contains 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 Sometype<T: SomeProtocol> { | |
case one | |
case two | |
case three | |
associatedtype Associated { | |
switch { | |
case .one: return One.self | |
case .two: return Two.self | |
case .three: retrun Three.self | |
} | |
} | |
} | |
protocol SomeProtocol { | |
} | |
struct One: SomeProtocol { | |
} | |
struct Two: SomeProtocol { | |
} | |
struct Three: SomeProtocol { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment