@@ -244,26 +244,6 @@ extension String.UnicodeScalarView : _CustomPlaygroundQuickLookable {
244
244
}
245
245
246
246
//===--- Slicing Support --------------------------------------------------===//
247
- // In Swift 3.2, in the absence of type context,
248
- //
249
- // someString.unicodeScalars[
250
- // someString.unicodeScalars.startIndex
251
- // ..< someString.unicodeScalars.endIndex]
252
- //
253
- // was deduced to be of type `String.UnicodeScalarView`. Provide a
254
- // more-specific Swift-3-only `subscript` overload that continues to produce
255
- // `String.UnicodeScalarView`.
256
- extension String . UnicodeScalarView {
257
- @available ( swift, obsoleted: 4 )
258
- public subscript( bounds: Range < Index > ) -> String . UnicodeScalarView {
259
- Builtin . unreachable ( )
260
- }
261
-
262
- @available ( swift, obsoleted: 4 )
263
- public subscript( bounds: ClosedRange < Index > ) -> String . UnicodeScalarView {
264
- Builtin . unreachable ( )
265
- }
266
- }
267
247
268
248
// @available(swift,deprecated: 5.0, renamed: "Unicode.UTF8")
269
249
public typealias UTF8 = Unicode . UTF8
@@ -327,11 +307,6 @@ extension Substring {
327
307
_precondition ( range. upperBound <= endIndex,
328
308
" String index range is out of bounds " )
329
309
}
330
-
331
- @available ( swift, obsoleted: 4 )
332
- public subscript( bounds: ClosedRange < Index > ) -> String {
333
- Builtin . unreachable ( )
334
- }
335
310
}
336
311
337
312
extension Substring : _CustomPlaygroundQuickLookable {
@@ -567,13 +542,6 @@ extension Sequence {
567
542
) rethrows -> [ ElementOfResult ] {
568
543
return try _compactMap ( transform)
569
544
}
570
-
571
- @available ( swift, obsoleted: 4 )
572
- public func flatMap(
573
- _ transform: ( Element ) throws -> String
574
- ) rethrows -> [ String ] {
575
- return try map ( transform)
576
- }
577
545
}
578
546
579
547
extension Collection {
0 commit comments