Skip to content

Commit 9d4fe41

Browse files
nsajkoKristoffer Carlsson
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 04e7aae commit 9d4fe41

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
@@ -763,7 +763,7 @@ function append_c_digits(olength::Int, digits::Unsigned, buf, pos::Int)
763763
while i >= 2
764764
d, c = divrem(digits, 0x64)
765765
digits = oftype(digits, d)
766-
@inbounds d100 = _dec_d100[(c % Int) + 1]
766+
@inbounds d100 = _dec_d100[(c % Int)::Int + 1]
767767
@inbounds buf[pos + i - 2] = d100 % UInt8
768768
@inbounds buf[pos + i - 1] = (d100 >> 0x8) % UInt8
769769
i -= 2

0 commit comments

Comments
 (0)