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) }
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset