Name and label changes for closure parameters (for review only) (#2981)

Implement SE-0118 Name and label changes for closure parameters

[SE-0118](https://github.com/apple/swift-evolution/blob/master/proposals/0118-closure-parameter-names-and-labels.md)
This commit is contained in:
Dave Abrahams
2016-07-15 15:31:48 -07:00
committed by GitHub
parent a77539aa38
commit 18406900ba
65 changed files with 382 additions and 350 deletions

View File

@@ -144,12 +144,12 @@ func randomArray() -> A<Int> {
Algorithm.test("invalidOrderings") {
withInvalidOrderings {
var a = randomArray()
_blackHole(a.sorted(isOrderedBefore: $0))
_blackHole(a.sorted(by: $0))
}
withInvalidOrderings {
var a: A<Int>
a = randomArray()
_ = a.partition(isOrderedBefore: $0)
_ = a.partition(by: $0)
}
/*
// FIXME: Disabled due to <rdar://problem/17734737> Unimplemented:
@@ -188,7 +188,7 @@ func makeQSortKiller(_ len: Int) -> [Int] {
var ary = [Int](repeating: 0, count: len)
var ret = [Int](repeating: 0, count: len)
for i in 0..<len { ary[i] = i }
ary = ary.sorted(isOrderedBefore: Compare)
ary = ary.sorted(by: Compare)
for i in 0..<len {
ret[ary[i]] = i
}