Skip to content

Instantly share code, notes, and snippets.

@xcadaverx
Created July 7, 2018 19:01
Show Gist options
  • Save xcadaverx/158eaf40d83c8b4abe3d66a958cf5aa5 to your computer and use it in GitHub Desktop.
Save xcadaverx/158eaf40d83c8b4abe3d66a958cf5aa5 to your computer and use it in GitHub Desktop.
extension Foo where Self: SomeFoo {
func bar() {
print("Foo.SomeFoo.bar()")
}
}
let someFoo: SomeFoo = SomeFoo()
someFoo.bar() // Foo.SomeFoo.bar()
let anotherFoo: Foo = SomeFoo()
anotherFoo.bar() // Foo.SomeFoo.bar()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment