Skip to content

Commit 1c0d598

Browse files
ravikandhadaiairspeedswift
authored andcommitted
[stdlib] update the fatal error message displayed during invalid int-to-int conversions (<rdar://39542040>) (#16480)
1 parent f4c24d6 commit 1c0d598

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/core/Integers.swift.gyb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3105,7 +3105,7 @@ extension UnsignedInteger where Self : FixedWidthInteger {
31053105
// This check is potentially removable by the optimizer
31063106
if source.bitWidth >= Self.bitWidth {
31073107
_precondition(source <= Self.max,
3108-
"Not enough bits to represent a signed value")
3108+
"Not enough bits to represent the passed value")
31093109
}
31103110
self.init(truncatingIfNeeded: source)
31113111
}
@@ -3215,7 +3215,7 @@ extension SignedInteger where Self : FixedWidthInteger {
32153215
if (source.bitWidth > Self.bitWidth) ||
32163216
(source.bitWidth == Self.bitWidth && !T.isSigned) {
32173217
_precondition(source <= Self.max,
3218-
"Not enough bits to represent a signed value")
3218+
"Not enough bits to represent the passed value")
32193219
}
32203220
self.init(truncatingIfNeeded: source)
32213221
}

0 commit comments

Comments
 (0)