On Wed, Nov 4, 2015 at 8:44 AM, Jason Merrill <[email protected]> wrote: > I have a custom immutable type that wraps an Int16: > > julia> immutable DigitSet > d::Int16 > end > > julia> isbits(DigitSet) > true > > I was hoping to be able to reinterpret an Int16 as this type, but I get an > error that confusingly says that the first argument must be a bits type:
It's confusing because there's isbits and bitstype ... https://github.com/JuliaLang/julia/issues/11822 > > julia> reinterpret(DigitSet, Int16(3)) > ERROR: reinterpret: expected bits type as first argument > in reinterpret at essentials.jl:115 > > I can, however, reinterpret a Vector{Int16} into a Vector{DigitSet}. > > julia> reinterpret(DigitSet, Int16[3]) > 1-element Array{DigitSet,1}: > DigitSet(3) > > Am I seeing a bug here? Or is this expected for some reason? See https://github.com/JuliaLang/julia/issues/13701
