Skip to content

Instantly share code, notes, and snippets.

@ohnishiakira
Created August 4, 2016 08:31
Show Gist options
  • Save ohnishiakira/f7d13c66255c0cca0ae7439ab6c1d2a7 to your computer and use it in GitHub Desktop.
Save ohnishiakira/f7d13c66255c0cca0ae7439ab6c1d2a7 to your computer and use it in GitHub Desktop.
enum A : String, EnumProtocol {
case AAA, BBB
}
protocol EnumProtocol {
func desc() -> String
}
extension EnumProtocol {
func desc() -> String { return self.rawValue } // Value of type 'Self' has no member 'rawValue'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment