Skip to content

Instantly share code, notes, and snippets.

@ezura
Created February 6, 2016 06:41
Show Gist options
  • Save ezura/e458accf3e3cc92c0c38 to your computer and use it in GitHub Desktop.
Save ezura/e458accf3e3cc92c0c38 to your computer and use it in GitHub Desktop.
エラー、出てくれるのね(。 ・ω・)) #CodePiece #cswift
protocol A {
func protocolAFunc ();
}
protocol B {
func protocolBFunc ();
}
struct Sample {
func protocolAFunc() {
print("not extension A")
}
}
extension Sample: A {
func protocolAFunc() {
print("extension A")
}
}
let a = Sample()
a.protocolAFunc()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment