@@ -252,7 +252,7 @@ public struct ${Self}<Base : ${BaseRequirements}>
252
252
let newSliceCount: IndexDistance =
253
253
_base.distance(from: _startIndex, to: subRange.lowerBound)
254
254
+ _base.distance(from: subRange.upperBound, to: _endIndex)
255
- + numericCast(newElements.count)
255
+ + ( numericCast(newElements.count) as IndexDistance )
256
256
_base.replaceSubrange(subRange, with: newElements)
257
257
_startIndex = _base.index(_base.startIndex, offsetBy: sliceOffset)
258
258
_endIndex = _base.index(_startIndex, offsetBy: newSliceCount)
@@ -261,7 +261,7 @@ public struct ${Self}<Base : ${BaseRequirements}>
261
261
let newSliceCount: IndexDistance =
262
262
_base.distance(from: _startIndex, to: subRange.lowerBound)
263
263
+ _base.distance(from: subRange.upperBound, to: _endIndex)
264
- + numericCast(newElements.count)
264
+ + ( numericCast(newElements.count) as IndexDistance )
265
265
_base.replaceSubrange(subRange, with: newElements)
266
266
_startIndex = _base.startIndex
267
267
_endIndex = _base.index(_startIndex, offsetBy: newSliceCount)
@@ -270,7 +270,7 @@ public struct ${Self}<Base : ${BaseRequirements}>
270
270
let lastValidIndex = _base.index(before: subRange.lowerBound)
271
271
let newEndIndexOffset =
272
272
_base.distance(from: subRange.upperBound, to: _endIndex)
273
- + numericCast(newElements.count) + 1
273
+ + ( numericCast(newElements.count) as IndexDistance ) + 1
274
274
_base.replaceSubrange(subRange, with: newElements)
275
275
if shouldUpdateStartIndex {
276
276
_startIndex = _base.index(after: lastValidIndex)
@@ -318,14 +318,14 @@ public struct ${Self}<Base : ${BaseRequirements}>
318
318
let sliceOffset: IndexDistance =
319
319
_base.distance(from: _base.startIndex, to: _startIndex)
320
320
let newSliceCount: IndexDistance =
321
- count + numericCast(newElements.count)
321
+ count + ( numericCast(newElements.count) as IndexDistance )
322
322
_base.insert(contentsOf: newElements, at: i)
323
323
_startIndex = _base.index(_base.startIndex, offsetBy: sliceOffset)
324
324
_endIndex = _base.index(_startIndex, offsetBy: newSliceCount)
325
325
% else:
326
326
if i == _base.startIndex {
327
327
let newSliceCount: IndexDistance =
328
- count + numericCast(newElements.count)
328
+ count + ( numericCast(newElements.count) as IndexDistance )
329
329
_base.insert(contentsOf: newElements, at: i)
330
330
_startIndex = _base.startIndex
331
331
_endIndex = _base.index(_startIndex, offsetBy: newSliceCount)
@@ -334,7 +334,7 @@ public struct ${Self}<Base : ${BaseRequirements}>
334
334
let lastValidIndex = _base.index(before: i)
335
335
let newEndIndexOffset =
336
336
_base.distance(from: i, to: _endIndex)
337
- + numericCast(newElements.count) + 1
337
+ + ( numericCast(newElements.count) as IndexDistance ) + 1
338
338
_base.insert(contentsOf: newElements, at: i)
339
339
if shouldUpdateStartIndex {
340
340
_startIndex = _base.index(after: lastValidIndex)
0 commit comments