9
使用XCode 9,Beta 3。Swift 4:无法将类型'(_) - >()'的值转换为期望的参数类型'() - >()'或传递给不带参数的调用的参数
statsView.createButton("Button name") { [weak self] Void in
//stuff stuff
self?.doSomething()
}
我得到了数百个这样的错误,我该如何解决它们?
错误:
Cannot convert value of type '(_) ->()' to expected argument type '() ->()'
Argument passed to call that takes no arguments