Skip to content

Instantly share code, notes, and snippets.

@mtitolo
Created December 16, 2015 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtitolo/1e185a7a1da432202816 to your computer and use it in GitHub Desktop.
Save mtitolo/1e185a7a1da432202816 to your computer and use it in GitHub Desktop.
Protocol typealias
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