Created
December 16, 2015 23:40
-
-
Save mtitolo/1e185a7a1da432202816 to your computer and use it in GitHub Desktop.
Protocol typealias
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 SomeProtocol { | |
typealias SomeFunc = () -> Void | |
} | |
extension SomeProtocol { | |
func doSomething(someFunc: SomeFunc) { | |
someFunc() // Invalid use of '()' to call a value of non-function type 'Self.SomeFunc' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment