Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protocol SomeProtocol {
- associatedtype Answer
- func getAnswer() -> Answer
- }
- class Calculator {
- func getAnswer() -> Int {
- return 0
- }
- }
- extension Calculator : SomeProtocol {
- typealias Answer = Double
- func getAnswer() -> Double {
- return 1.0
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement