Skip to content

Commit 50b2401

Browse files
Merge pull request #17232 from ravikandhadai/swift-4.2-branch
[4.2][stdlib] update the fatal error message displayed during invalid int-to-int conversions (<rdar://39542040>) (#16480)
2 parents 981613b + 1554d00 commit 50b2401

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
@@ -3113,7 +3113,7 @@ extension UnsignedInteger where Self : FixedWidthInteger {
31133113
// This check is potentially removable by the optimizer
31143114
if source.bitWidth >= Self.bitWidth {
31153115
_precondition(source <= Self.max,
3116-
"Not enough bits to represent a signed value")
3116+
"Not enough bits to represent the passed value")
31173117
}
31183118
self.init(truncatingIfNeeded: source)
31193119
}
@@ -3223,7 +3223,7 @@ extension SignedInteger where Self : FixedWidthInteger {
32233223
if (source.bitWidth > Self.bitWidth) ||
32243224
(source.bitWidth == Self.bitWidth && !T.isSigned) {
32253225
_precondition(source <= Self.max,
3226-
"Not enough bits to represent a signed value")
3226+
"Not enough bits to represent the passed value")
32273227
}
32283228
self.init(truncatingIfNeeded: source)
32293229
}

0 commit comments

Comments
 (0)