Swift 4: Cannot convert value of type '(_) -> ()' to expected argument type '() -> ()' or Argument passed to call that takes no arguments

Viewed 17090

Using XCode 9, Beta 3. Swift 4.

statsView.createButton("Button name") { [weak self] Void in
   //stuff stuff
   self?.doSomething()
}

I get hundreds of errors like this, how do I fix them?

Errors:

Cannot convert value of type '(_) -> ()' to expected argument type '() -> ()'

Argument passed to call that takes no arguments
1 Answers
Related