[swift-users] [swift-evolution] Tuple

Adrian Zubarev adrian.zubarev at devandartist.com
Wed Jul 20 03:59:56 CDT 2016

CC to the right place.

Adrian Zubarev
Sent with Airmail

Am 20. Juli 2016 um 10:08:13, Fabian Ehrentraud via swift-evolution (swift-evolution at swift.org) schrieb:


I have a problem with tuple parameter types in a closure. Is this a language restriction or a bug in the Swift compiler? I used the Swift shipped with Xcode beta 3, also tried in Swift 2.2.

let d: [Int: String] = [1:"1", 0:"0"]
let e = d.sorted(isOrderedBefore: { e1, e2 in e1.0 < e2.0 }) // works
let f = d.sorted(isOrderedBefore: { (k1, v1), (k2, v2) in k1 < k2 }) // does not compile

swift-evolution mailing list
swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160720/ef60519b/attachment.html>

More information about the swift-users mailing list