Skip to content

Commit e8a8067

Browse files
author
Max Moiseev
committed
[stdlib] Move a + overload from extension String to extension Sequence
1 parent 4794ead commit e8a8067

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

stdlib/public/core/StringRangeReplaceableCollection.swift.gyb

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -454,16 +454,14 @@ extension Collection {
454454
}
455455
//===----------------------------------------------------------------------===//
456456

457-
extension String {
457+
extension Sequence where Element == String {
458458
@available(*, unavailable, message: "Operator '+' cannot be used to append a String to a sequence of strings")
459-
public static func + <S : Sequence>(lhs: S, rhs: String) -> Never
460-
where S.Iterator.Element == String {
461-
fatalError()
459+
public static func + (lhs: Self, rhs: String) -> Never {
460+
fatalError()
462461
}
463462

464463
@available(*, unavailable, message: "Operator '+' cannot be used to append a String to a sequence of strings")
465-
public static func + <S : Sequence>(lhs: String, rhs: S) -> Never
466-
where S.Iterator.Element == String {
467-
fatalError()
464+
public static func + (lhs: String, rhs: Self) -> Never {
465+
fatalError()
468466
}
469467
}

0 commit comments

Comments
 (0)