PooledArrays.jl icon indicating copy to clipboard operation
PooledArrays.jl copied to clipboard

bug with empty constructors

Open kragol opened this issue 2 years ago • 0 comments

In src/PooledArrays.jl at lines 202-203, we find the following code

@inline PooledArray(t::Type) = PooledArray(Array(t,0))
@inline PooledArray(t::Type, r::Type) = PooledArray(Array(t,0), r)

which does not work as there is no method Array(::Type,::Int).

I guess the intent was more like Array{t}(undef,0) (or just t[]) instead of Array(t,0).

kragol avatar Jul 28 '23 15:07 kragol