Skip to content

Instantly share code, notes, and snippets.

@fitomad
Created August 24, 2016 08:31
Show Gist options
  • Save fitomad/b7a7d6ec59eb3c99777e22bf64efee8a to your computer and use it in GitHub Desktop.
Save fitomad/b7a7d6ec59eb3c99777e22bf64efee8a to your computer and use it in GitHub Desktop.
//
// Esta definición *no* le gusta al compilador de `Swift 3`
//
typealias ResultCompletionHandler<T, U> = (message: T, tipo: U) -> (Void)
/*
ERROR at line 3, col 44: function types cannot have argument label 'message'; use '_' instead
typealias ResultCompletionHandler<T, U> = (message: T, tipo: U) -> (Void)
ERROR at line 3, col 56: function types cannot have argument label 'tipo'; use '_' instead
typealias ResultCompletionHandler<T, U> = (message: T, tipo: U) -> (Void)
*/
//
// En cambio esta *sí* que le parece bien.
//
typealias ResultCompletionHandler<T, U> = (_ message: T, _ tipo: U) -> (Void)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment