Skip to content

some primitive-type objects of non-power-of-two size are not printed when even #37974

@rfourquet

Description

@rfourquet
julia> primitive type UInt24 24 end

julia> a = reinterpret(UInt24, UInt8[1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0])
4-element reinterpret(UInt24, ::Vector{UInt8}):
 UInt24(0x000001)
 UInt24(0x000002)
 UInt24(0x000003)
 UInt24(0x000004)

julia> a[1]
UInt24(0x000001)

julia> a[2]

julia> a[3]
UInt24(0x000003)

julia> a[4]

One surprising thing is that if you re-eval a REPL.print_response method, then everything is again printed as expected:

julia> @eval REPL function print_response(errio::IO, @nospecialize(response), show_value::Bool, have_color::Bool, specialdisplay::Union{AbstractDisplay,Nothing}=nothing)
 # ... cf. link above
end;

julia> a[2]
UInt24(0x000002)

This was not an issue in Julia 1.5.

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviordisplay and printingAesthetics and correctness of printed representations of objects.regressionRegression in behavior compared to a previous version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions