File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -725,7 +725,7 @@ extension Sequence {
725
725
// overloads.
726
726
@inline ( __always)
727
727
public func _flatMap< ElementOfResult> (
728
- _ transform: ( $ { GElement } ) throws -> ElementOfResult ?
728
+ _ transform: ( Element ) throws -> ElementOfResult ?
729
729
) rethrows -> [ ElementOfResult ] {
730
730
var result : [ ElementOfResult ] = [ ]
731
731
for element in self {
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ extension String : StringProtocol {
41
41
// and disambiguates between the following intitializers, now that String
42
42
// conforms to Collection:
43
43
// - init<T>(_ value: T) where T : LosslessStringConvertible
44
- // - init<S>(_ characters: S) where S : Sequence, S.Iterator. Element == Character
44
+ // - init<S>(_ characters: S) where S : Sequence, S.Element == Character
45
45
public init(_ other: String) {
46
46
self.init(other._core)
47
47
}
@@ -395,15 +395,15 @@ extension String {
395
395
extension Sequence {
396
396
@available(swift, obsoleted: 4)
397
397
public func flatMap(
398
- _ transform: (Iterator. Element) throws -> String
398
+ _ transform: (Element) throws -> String
399
399
) rethrows -> [String] {
400
400
return try map(transform)
401
401
}
402
402
}
403
403
404
404
extension Collection {
405
405
public func flatMap(
406
- _ transform: (Iterator. Element) throws -> String?
406
+ _ transform: (Element) throws -> String?
407
407
) rethrows -> [String] {
408
408
return try _flatMap(transform)
409
409
}
You can’t perform that action at this time.
0 commit comments