So this is a function from a class that lets you have a double tap and a single tap gesture. It\'s working fine in Swift 2.3, but after converting to Swift 3 it\'s throwing
From another topic:
func someFunction(someParameter: someType, completionClosure: @escaping @autoclosure () -> ()? = nil)
The use of @autoclosure allowed me to assign nil to the optional closure.
The full details of how exactly @autoclosure helps escape me (why "my" closure is "not good" but the Swift_generated_one_that_simply_wraps_mine is?) . But, it helped me get rid of ... ...and call my function in either of two ways:
someFunction(x, { ... })
OR
someFunction(x)
Here is the way how i could overcome this. Here clang is not aware about its type. I gave a typealias and optional declaration,
typealias appDelegateBlock = ()->()
In your class, just declare it as optional,
var block: appDelegateBlock?
block = task
Try with: var closure: (()->())? = task