We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90ad689 commit a1e33e1Copy full SHA for a1e33e1
stdlib/public/core/Array.swift
@@ -1549,8 +1549,9 @@ extension Array {
1549
defer {
1550
// Update self.count even if initializer throws an error.
1551
_precondition(
1552
- initializedCount <= _unsafeUninitializedCapacity,
1553
- "Initialized count set to greater than specified capacity."
+ UInt(truncatingIfNeeded: initializedCount) <=
+ UInt(truncatingIfNeeded: _unsafeUninitializedCapacity),
1554
+ "Initialized count must be in 0 ... _unsafeUninitializedCapacity."
1555
)
1556
unsafe _precondition(
1557
buffer.baseAddress == firstElementAddress,
0 commit comments