Skip to content

Instantly share code, notes, and snippets.

@ezura
Created February 6, 2016 06:43
Show Gist options
  • Save ezura/1a727c72d49f5f001f9b to your computer and use it in GitHub Desktop.
Save ezura/1a727c72d49f5f001f9b to your computer and use it in GitHub Desktop.
error: invalid redeclaration of 'protocolFunc()' #CodePiece #cswift
protocol A {
func protocolFunc ();
}
protocol B {
func protocolFunc ();
}
struct Sample {
}
extension Sample: A {
func protocolFunc() {
print("extension A")
}
}
extension Sample: B {
func protocolFunc() {
print("extension B")
}
}
let a = Sample()
a.protocolFunc()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment