-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviordisplay and printingAesthetics and correctness of printed representations of objects.Aesthetics and correctness of printed representations of objects.
Description
MWE:
julia> @enum Foo a b
julia> dump(Dict{Foo, Int}())
Dict{Foo, Int64}
slots: Array{UInt8}((16,)) UInt8[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
keys: Array{Foo}((16,))
1: Foo ERROR: KeyError: key 1742231696 not found
I can't tell if this can realistically be fixed or not. The issue is that the .keys
field of the Dict is uninitialized, and thus contain invalid (and un-printable values).
One possible solution could be to wrap the show in dump
in try-catch, but will that cause too undefined behaviour? What if the show method throws some other, unrelated error?
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviordisplay and printingAesthetics and correctness of printed representations of objects.Aesthetics and correctness of printed representations of objects.