
上QQ阅读APP看书,第一时间看更新
Adding tuple destructuring
Consider code such as the following:
swift func foo(_: ((Int, Int) -> ()) {} foo { (x, y) in print(x + y) }
The migrator must add explicit tuple destructuring to continue building in Swift 4, such as shown here:
swift func foo(_: ((Int, Int) -> ()) {} foo { let (x, y) = $0; print(x + y) }