File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,9 @@ public protocol _RangeReplaceableIndexable : _Indexable {
244
244
public protocol RangeReplaceableCollection
245
245
: _RangeReplaceableIndexable , Collection
246
246
{
247
+ associatedtype SubSequence : RangeReplaceableIndexable /*: RangeReplaceableCollection*/
248
+ = RangeReplaceableSlice < Self >
249
+
247
250
//===--- Fundamental Requirements ---------------------------------------===//
248
251
249
252
/// Creates a new, empty collection.
Original file line number Diff line number Diff line change @@ -116,3 +116,18 @@ struct BadBidirectionalIndexable : BidirectionalIndexable {
116
116
// expected-error@+1 {{'index(after:)' has different argument names from those required by protocol '_BidirectionalIndexable' ('index(before:)'}}
117
117
func index( after i: Int ) -> Int { return 0 }
118
118
}
119
+
120
+ //
121
+ // Check that RangeReplaceableCollection.SubSequence is defaulted.
122
+ //
123
+
124
+ struct RangeReplaceableCollection_SubSequence_IsDefaulted : RangeReplaceableCollection {
125
+ var startIndex : Int { fatalError ( ) }
126
+ var endIndex : Int { fatalError ( ) }
127
+
128
+ func index( after: Int ) -> Int { fatalError ( ) }
129
+ func index( before: Int ) -> Int { fatalError ( ) }
130
+ func index( _: Int , offsetBy: Int ) -> Int { fatalError ( ) }
131
+ func distance( from: Int , to: Int ) -> Int { fatalError ( ) }
132
+ }
133
+
You can’t perform that action at this time.
0 commit comments