@@ -418,15 +418,15 @@ public func checkOneLevelOfForwardCollection<
418
418
// Check Index semantics
419
419
//===------------------------------------------------------------------===//
420
420
421
- let succ = { collection. index ( after: $0) }
421
+ let succ : ( C . Index ) -> C . Index = { collection. index ( after: $0) }
422
422
// Advances up to 1 positions without passing endIndex. Don't use
423
423
// advanced(by: n) to do this because it's under test here.
424
- let next = { $0 == collection. endIndex ? $0 : succ ( $0) }
424
+ let next : ( C . Index ) -> C . Index = { $0 == collection. endIndex ? $0 : succ ( $0) }
425
425
426
426
// advances up to 5 positions without passing endIndex. Picking a
427
427
// small constant to avoid complexity explosion on large input
428
428
// collections.
429
- let next5 = { next ( next ( next ( next ( next ( $0) ) ) ) ) }
429
+ let next5 : ( C . Index ) -> C . Index = { next ( next ( next ( next ( next ( $0) ) ) ) ) }
430
430
431
431
let partWay0 = next5 ( collection. startIndex)
432
432
let partWay1 = next5 ( partWay0)
@@ -528,7 +528,7 @@ Expected: Collection, S : Collection
528
528
529
529
let expectedArray = Array ( expected)
530
530
531
- let succ = { sliceable. index ( after: $0) }
531
+ let succ : ( S . Index ) -> S . Index = { sliceable. index ( after: $0) }
532
532
533
533
var start = sliceable. startIndex
534
534
for startNumericIndex in 0 ... expectedArray. count {
@@ -642,16 +642,16 @@ public func checkOneLevelOfBidirectionalCollection<
642
642
// Check Index semantics
643
643
//===------------------------------------------------------------------===//
644
644
645
- let succ = { collection. index ( after: $0) }
646
- let pred = { collection. index ( before: $0) }
645
+ let succ : ( C . Index ) -> C . Index = { collection. index ( after: $0) }
646
+ let pred : ( C . Index ) -> C . Index = { collection. index ( before: $0) }
647
647
// Advances up to 1 positions without passing endIndex. Don't use
648
648
// advanced(by: n) to do this because it's under test here.
649
- let next = { $0 == collection. endIndex ? $0 : succ ( $0) }
649
+ let next : ( C . Index ) -> C . Index = { $0 == collection. endIndex ? $0 : succ ( $0) }
650
650
651
651
// advances up to 5 positions without passing endIndex. Picking a
652
652
// small constant to avoid complexity explosion on large input
653
653
// collections.
654
- let next5 = { next ( next ( next ( next ( next ( $0) ) ) ) ) }
654
+ let next5 : ( C . Index ) -> C . Index = { next ( next ( next ( next ( next ( $0) ) ) ) ) }
655
655
656
656
let partWay0 = next5 ( collection. startIndex)
657
657
let partWay1 = next5 ( partWay0)
@@ -778,8 +778,8 @@ Expected: Collection, S : BidirectionalCollection
778
778
779
779
let expectedArray = Array ( expected)
780
780
781
- let succ = { sliceable. index ( after: $0) }
782
- let pred = { sliceable. index ( before: $0) }
781
+ let succ : ( S . Index ) -> S . Index = { sliceable. index ( after: $0) }
782
+ let pred : ( S . Index ) -> S . Index = { sliceable. index ( before: $0) }
783
783
784
784
var start = sliceable. startIndex
785
785
for startNumericIndex in 0 ... expectedArray. count {
@@ -905,15 +905,15 @@ public func checkOneLevelOfRandomAccessCollection<
905
905
// Check Index semantics
906
906
//===------------------------------------------------------------------===//
907
907
908
- let succ = { collection. index ( after: $0) }
908
+ let succ : ( C . Index ) -> C . Index = { collection. index ( after: $0) }
909
909
// Advances up to 1 positions without passing endIndex. Don't use
910
910
// advanced(by: n) to do this because it's under test here.
911
- let next = { $0 == collection. endIndex ? $0 : succ ( $0) }
911
+ let next : ( C . Index ) -> C . Index = { $0 == collection. endIndex ? $0 : succ ( $0) }
912
912
913
913
// advances up to 5 positions without passing endIndex. Picking a
914
914
// small constant to avoid complexity explosion on large input
915
915
// collections.
916
- let next5 = { next ( next ( next ( next ( next ( $0) ) ) ) ) }
916
+ let next5 : ( C . Index ) -> C . Index = { next ( next ( next ( next ( next ( $0) ) ) ) ) }
917
917
918
918
let partWay0 = next5 ( collection. startIndex)
919
919
let partWay1 = next5 ( partWay0)
@@ -1037,8 +1037,8 @@ Expected: Collection, S : RandomAccessCollection
1037
1037
1038
1038
let expectedArray = Array ( expected)
1039
1039
1040
- let succ = { sliceable. index ( after: $0) }
1041
- let pred = { sliceable. index ( before: $0) }
1040
+ let succ : ( S . Index ) -> S . Index = { sliceable. index ( after: $0) }
1041
+ let pred : ( S . Index ) -> S . Index = { sliceable. index ( before: $0) }
1042
1042
1043
1043
var start = sliceable. startIndex
1044
1044
for startNumericIndex in 0 ... expectedArray. count {
@@ -1186,15 +1186,15 @@ public func checkOneLevelOfForwardCollection<
1186
1186
// Check Index semantics
1187
1187
//===------------------------------------------------------------------===//
1188
1188
1189
- let succ = { collection. index ( after: $0) }
1189
+ let succ : ( C . Index ) -> C . Index = { collection. index ( after: $0) }
1190
1190
// Advances up to 1 positions without passing endIndex. Don't use
1191
1191
// advanced(by: n) to do this because it's under test here.
1192
- let next = { $0 == collection. endIndex ? $0 : succ ( $0) }
1192
+ let next : ( C . Index ) -> C . Index = { $0 == collection. endIndex ? $0 : succ ( $0) }
1193
1193
1194
1194
// advances up to 5 positions without passing endIndex. Picking a
1195
1195
// small constant to avoid complexity explosion on large input
1196
1196
// collections.
1197
- let next5 = { next ( next ( next ( next ( next ( $0) ) ) ) ) }
1197
+ let next5 : ( C . Index ) -> C . Index = { next ( next ( next ( next ( next ( $0) ) ) ) ) }
1198
1198
1199
1199
let partWay0 = next5 ( collection. startIndex)
1200
1200
let partWay1 = next5 ( partWay0)
@@ -1296,7 +1296,7 @@ Element, S : Collection
1296
1296
1297
1297
let expectedArray = Array ( expected)
1298
1298
1299
- let succ = { sliceable. index ( after: $0) }
1299
+ let succ : ( S . Index ) -> S . Index = { sliceable. index ( after: $0) }
1300
1300
1301
1301
var start = sliceable. startIndex
1302
1302
for startNumericIndex in 0 ... expectedArray. count {
@@ -1410,16 +1410,16 @@ public func checkOneLevelOfBidirectionalCollection<
1410
1410
// Check Index semantics
1411
1411
//===------------------------------------------------------------------===//
1412
1412
1413
- let succ = { collection. index ( after: $0) }
1414
- let pred = { collection. index ( before: $0) }
1413
+ let succ : ( C . Index ) -> C . Index = { collection. index ( after: $0) }
1414
+ let pred : ( C . Index ) -> C . Index = { collection. index ( before: $0) }
1415
1415
// Advances up to 1 positions without passing endIndex. Don't use
1416
1416
// advanced(by: n) to do this because it's under test here.
1417
- let next = { $0 == collection. endIndex ? $0 : succ ( $0) }
1417
+ let next : ( C . Index ) -> C . Index = { $0 == collection. endIndex ? $0 : succ ( $0) }
1418
1418
1419
1419
// advances up to 5 positions without passing endIndex. Picking a
1420
1420
// small constant to avoid complexity explosion on large input
1421
1421
// collections.
1422
- let next5 = { next ( next ( next ( next ( next ( $0) ) ) ) ) }
1422
+ let next5 : ( C . Index ) -> C . Index = { next ( next ( next ( next ( next ( $0) ) ) ) ) }
1423
1423
1424
1424
let partWay0 = next5 ( collection. startIndex)
1425
1425
let partWay1 = next5 ( partWay0)
@@ -1546,8 +1546,8 @@ Element, S : BidirectionalCollection
1546
1546
1547
1547
let expectedArray = Array ( expected)
1548
1548
1549
- let succ = { sliceable. index ( after: $0) }
1550
- let pred = { sliceable. index ( before: $0) }
1549
+ let succ : ( S . Index ) -> S . Index = { sliceable. index ( after: $0) }
1550
+ let pred : ( S . Index ) -> S . Index = { sliceable. index ( before: $0) }
1551
1551
1552
1552
var start = sliceable. startIndex
1553
1553
for startNumericIndex in 0 ... expectedArray. count {
@@ -1673,15 +1673,15 @@ public func checkOneLevelOfRandomAccessCollection<
1673
1673
// Check Index semantics
1674
1674
//===------------------------------------------------------------------===//
1675
1675
1676
- let succ = { collection. index ( after: $0) }
1676
+ let succ : ( C . Index ) -> C . Index = { collection. index ( after: $0) }
1677
1677
// Advances up to 1 positions without passing endIndex. Don't use
1678
1678
// advanced(by: n) to do this because it's under test here.
1679
- let next = { $0 == collection. endIndex ? $0 : succ ( $0) }
1679
+ let next : ( C . Index ) -> C . Index = { $0 == collection. endIndex ? $0 : succ ( $0) }
1680
1680
1681
1681
// advances up to 5 positions without passing endIndex. Picking a
1682
1682
// small constant to avoid complexity explosion on large input
1683
1683
// collections.
1684
- let next5 = { next ( next ( next ( next ( next ( $0) ) ) ) ) }
1684
+ let next5 : ( C . Index ) -> C . Index = { next ( next ( next ( next ( next ( $0) ) ) ) ) }
1685
1685
1686
1686
let partWay0 = next5 ( collection. startIndex)
1687
1687
let partWay1 = next5 ( partWay0)
@@ -1805,8 +1805,8 @@ Element, S : RandomAccessCollection
1805
1805
1806
1806
let expectedArray = Array ( expected)
1807
1807
1808
- let succ = { sliceable. index ( after: $0) }
1809
- let pred = { sliceable. index ( before: $0) }
1808
+ let succ : ( S . Index ) -> S . Index = { sliceable. index ( after: $0) }
1809
+ let pred : ( S . Index ) -> S . Index = { sliceable. index ( before: $0) }
1810
1810
1811
1811
var start = sliceable. startIndex
1812
1812
for startNumericIndex in 0 ... expectedArray. count {
0 commit comments