Skip to content

Commit 69a22cf

Browse files
authored
append_c_digits: typeassert Int to improve inference (JuliaLang#57950)
Makes the sysimage more resistant to method invalidation, when defining a new `Integer` subtype with a right bitshift method.
1 parent 1a4e094 commit 69a22cf

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
@@ -845,7 +845,7 @@ function append_c_digits(olength::Int, digits::Unsigned, buf, pos::Int)
845845
while i >= 2
846846
d, c = divrem(digits, 0x64)
847847
digits = oftype(digits, d)
848-
@inbounds d100 = _dec_d100[(c % Int) + 1]
848+
@inbounds d100 = _dec_d100[(c % Int)::Int + 1]
849849
@inbounds buf[pos + i - 2] = d100 % UInt8
850850
@inbounds buf[pos + i - 1] = (d100 >> 0x8) % UInt8
851851
i -= 2

0 commit comments

Comments
 (0)