Re: [swift-users] swift 4 compiler error tuple parameter does not support destructing

2017-06-29 Thread CK TUNG via swift-users
Many thanks.  It works in Swift 4 Xcode 9 beta2. On Jun 30, 2017, at 11:20 AM, Daniel Dunbar wrote: This is due to SE-0110:   https://github.com/apple/swift-evolution/blob/master/proposals/0110-distingish-single-tuple-arg.md but see the additional commentary:    https://lists.swift.org/piperma

Re: [swift-users] swift 4 compiler error tuple parameter does not support destructing

2017-06-29 Thread Daniel Dunbar via swift-users
This is due to SE-0110: https://github.com/apple/swift-evolution/blob/master/proposals/0110-distingish-single-tuple-arg.md but see the additional commentary: https://lists.swift.org/pipermail/swift-evolution-announce/2017-June/000386.html For now you can rewrite it as: ``` let filenamelength

[swift-users] swift 4 compiler error tuple parameter does not support destructing

2017-06-29 Thread CK TUNG via swift-users
I have the following code snippet that compile OK in swift 3             bytes = Array(UnsafeBufferPointer())             let filenamelength = bytes[(i+28)..<(i+28+2)]                 .enumerated()                 .map { (index, element) in return Int(Double(element) * pow(256,Double(index))