@@ -1687,9 +1687,7 @@ extension BinaryInteger {
1687
1687
@_inlineable // FIXME(sil-serialize-all)
1688
1688
@_versioned
1689
1689
@_transparent
1690
- internal func _description(
1691
- radix: Int = 10 , uppercase: Bool = false
1692
- ) -> String {
1690
+ internal func _description( radix: Int , uppercase: Bool ) -> String {
1693
1691
_precondition ( 2 ... 36 ~= radix, " Radix must be between 2 and 36 " )
1694
1692
1695
1693
if bitWidth <= 64 {
@@ -1707,14 +1705,14 @@ extension BinaryInteger {
1707
1705
// (although not necessarily the case for builtin types).
1708
1706
let isRadixPowerOfTwo = radix. nonzeroBitCount == 1
1709
1707
let radix_ = Magnitude ( radix)
1710
- let quotientAndRemainder : ( Magnitude ) -> ( Magnitude , Magnitude ) = { value in
1708
+ func _quotientAndRemainder ( _ value : Magnitude ) -> ( Magnitude , Magnitude ) {
1711
1709
return isRadixPowerOfTwo
1712
1710
? ( value >> radix. trailingZeroBitCount, value & ( radix_ - 1 ) )
1713
1711
: value. quotientAndRemainder ( dividingBy: radix_)
1714
1712
}
1715
1713
1716
1714
let hasLetters = radix > 10
1717
- let ascii : ( UInt8 ) -> UInt8 = { digit in
1715
+ func _ascii ( _ digit : UInt8 ) -> UInt8 {
1718
1716
let base : UInt8
1719
1717
if !hasLetters || digit < 10 {
1720
1718
base = UInt8 ( ( " 0 " as Unicode . Scalar) . value)
@@ -1730,8 +1728,8 @@ extension BinaryInteger {
1730
1728
var value = magnitude
1731
1729
var result : [ UInt8 ] = [ ]
1732
1730
while value != 0 {
1733
- let ( quotient, remainder) = quotientAndRemainder ( value)
1734
- result. append ( ascii ( UInt8 ( truncatingIfNeeded: remainder) ) )
1731
+ let ( quotient, remainder) = _quotientAndRemainder ( value)
1732
+ result. append ( _ascii ( UInt8 ( truncatingIfNeeded: remainder) ) )
1735
1733
value = quotient
1736
1734
}
1737
1735
@@ -1745,7 +1743,7 @@ extension BinaryInteger {
1745
1743
/// A textual representation of this value.
1746
1744
@_inlineable // FIXME(sil-serialize-all)
1747
1745
public var description : String {
1748
- return _description ( )
1746
+ return _description ( radix : 10 , uppercase : false )
1749
1747
}
1750
1748
}
1751
1749
0 commit comments