Created
April 9, 2019 22:33
-
-
Save faganello60/ae55677f4a54dea2df4aa23f4384bb29 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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