XCode 9, Beta 3. Swift 4.
let button = JumpingButton(x: 0, y: 50, w: 150, h: 300) // JumpingButton: UIButton
//Inside JumpingButton: // var clickAction: (() -> ())?
button.clickAction = { (sender) -> Void in //Error line
action()
Sound.playSound(Sounds.Button)
}
Getting the error: Cannot assign value of type '(_) -> Void' to type '(() -> ())?'