Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/PooledArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ end
PooledArray{T}(d, signed=signed, compress=compress)

# Construct an empty PooledVector of a specific type
@inline PooledArray(t::Type) = PooledArray(Array(t,0))
@inline PooledArray(t::Type, r::Type) = PooledArray(Array(t,0), r)
@inline PooledArray(t::Type) = PooledArray(Array{t}(undef,0))
@inline PooledArray(t::Type, r::Type) = PooledArray(Array{t}(undef,0), r)

##############################################################################
##
Expand Down
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ end
@testset "PooledArrays" begin
@test eltype(PooledArray(Int[])) === Int

@test PooledArray(Int) == Int[]
@test PooledArray(Int,UInt64) == Int[]

a = rand(10)
b = rand(10,10)
c = rand(1:10, 1000)
Expand Down