Skip to content

Commit

Permalink
Add another assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
nalimilan authored Feb 4, 2019
1 parent a209389 commit b3036f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/PooledArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ function PooledArray{T}(d::AbstractArray, r::Type{R}) where {T,R<:Integer}
throw(ArgumentError("Cannot construct a PooledArray with type $R with a pool of size $(length(pool))"))
end

PooledArray(RefArray(refs), invpool::Dict{T,R})
# Assertions are needed since _label is not type stable
PooledArray(RefArray(refs::Vector{R}), invpool::Dict{T,R})
end

function PooledArray{T}(d::AbstractArray) where T
Expand Down

0 comments on commit b3036f8

Please sign in to comment.