Skip to content

Instantly share code, notes, and snippets.

@fuxx
Created August 21, 2015 17:37
Show Gist options
  • Save fuxx/9e264bf378fe4b4adcd7 to your computer and use it in GitHub Desktop.
Save fuxx/9e264bf378fe4b4adcd7 to your computer and use it in GitHub Desktop.
protocol A {
var name: String { get set }
func foo()
}
protocol B {
var name: String { get set }
func foo()
}
extension A {
func foo() {
print("Foo")
}
}
extension B {
func foo() {
print("Bar")
}
}
class C: A, B {
var name: String = "Foo Bar"
}
let c = C()
c.foo()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment