Created
March 3, 2016 02:57
-
-
Save es-kumagai/e2d0fbcffc4d80db5ce9 to your computer and use it in GitHub Desktop.
完全にわかった! @gillygize さんの教えてくれた通りに動くみたい。衝突すると「衝突した」ではなくて「準拠してない」って出る。 #CodePiece #tryswiftconf
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
protocol A { | |
func method() -> String | |
} | |
protocol B { | |
func method() -> String | |
} | |
extension A { | |
func method() -> String { | |
return "A" | |
} | |
} | |
extension B { | |
func method() -> String { | |
return "B" | |
} | |
} | |
// NG : Type 'Value' does not conforms to protocol 'A' | |
// NG : Type 'Value' does not conforms to protocol 'B' | |
struct Value : A, B { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment