Skip to content

Commit d4d0876

Browse files
nsajkoKristofferC
authored andcommitted
append_c_digits: typeassert Int to improve inference (#57950)
Makes the sysimage more resistant to method invalidation, when defining a new `Integer` subtype with a right bitshift method. (cherry picked from commit 69a22cf)
1 parent 9f0f7f4 commit d4d0876

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/intfuncs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ function append_c_digits(olength::Int, digits::Unsigned, buf, pos::Int)
801801
while i >= 2
802802
d, c = divrem(digits, 0x64)
803803
digits = oftype(digits, d)
804-
@inbounds d100 = _dec_d100[(c % Int) + 1]
804+
@inbounds d100 = _dec_d100[(c % Int)::Int + 1]
805805
@inbounds buf[pos + i - 2] = d100 % UInt8
806806
@inbounds buf[pos + i - 1] = (d100 >> 0x8) % UInt8
807807
i -= 2

0 commit comments

Comments
 (0)