Skip to content

Instantly share code, notes, and snippets.

@faganello60
Created April 9, 2019 22:33
Show Gist options
  • Save faganello60/ae55677f4a54dea2df4aa23f4384bb29 to your computer and use it in GitHub Desktop.
Save faganello60/ae55677f4a54dea2df4aa23f4384bb29 to your computer and use it in GitHub Desktop.
protocol Friendly {
func highFive()
}
protocol Angrily {
func rude()
}
extension Friendly {
func highFive() {
print("Hello")
}
}
extension Angrily {
func rude() {
print("shit")
}
}
class Personage {
}
class Singer: Personage, Friendly{
}
class Waiter: Personage, Friendly {
}
class Thief: Personage, Angrily {
}
let singer = Singer()
singer.highFive()
let thief = Thief()
thief.rude()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment