Hello,
Enum doesn't display UInt8 correctly
julia> @enum(MyEnum::UInt8,
A=0x00,
B=0x01,
C=0xf0,
)
julia> Base.Enums.basetype(MyEnum)
UInt8
julia> MyEnum
Enum MyEnum:
A = 0
B = 1
C = 240
althought
julia> Base.Enums.basetype(MyEnum)(C)
0xf0
I was expecting
julia> MyEnum
Enum MyEnum:
A = 0x00
B = 0x01
C = 0xf0
Kind regards
Should be easy to fix, would you like to try making a pull request? In base/Enum.jl, the Base.show
method should call show
instead of print
when printing the integer codes of values.
Hi, I would like to work on this issue if @scls19fr doesn't want
Thanks @guilhermeleobas you can do it if you want
Most helpful comment
Should be easy to fix, would you like to try making a pull request? In base/Enum.jl, the
Base.show
method should callshow
instead ofprint
when printing the integer codes of values.