File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,23 @@ struct CollectionWithNonDefaultSubSequence: Collection {
154
154
public subscript( position: Int ) -> Int { position }
155
155
}
156
156
157
+ struct MutableCollectionWithNonDefaultSubSequence : MutableCollection {
158
+ public var startIndex : Int
159
+ public var endIndex : Int
160
+
161
+ public typealias SubSequence = Self
162
+
163
+ public func index( after i: Int ) -> Int { i+ 1 }
164
+ public subscript( position: Int ) -> Int {
165
+ get { position }
166
+ set { _ = newValue }
167
+ }
168
+
169
+ public subscript( bounds: Range < Index > ) -> Self {
170
+ Self ( startIndex: bounds. startIndex, endIndex: bounds. endIndex)
171
+ }
172
+ }
173
+
157
174
// FIXME: Remove -verify-ignore-unknown.
158
175
// <unknown>:0: error: unexpected note produced: possibly intended match
159
176
// <unknown>:0: error: unexpected note produced: possibly intended match
You can’t perform that action at this time.
0 commit comments