Created
June 12, 2018 10:25
-
-
Save jandamm/b2d7a20b8e83aca634570b1b8e0ff16c to your computer and use it in GitHub Desktop.
This file contains 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 Test { | |
associatedtype Output | |
func test() -> Output | |
} | |
struct A: Test { | |
typealias Output = Void | |
func test() { | |
print("aa") | |
} | |
} | |
struct B: Test { | |
typealias Output = Int | |
func test() -> Int { | |
print("bb") | |
return 1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment