Skip to content
This repository has been archived by the owner on May 4, 2019. It is now read-only.

Commit

Permalink
Fix indexing
Browse files Browse the repository at this point in the history
Adapt to introduction of Base.OneTo <: AbstractUnitRange in
JuliaLang/julia@2b991c4
  • Loading branch information
davidagold committed Jul 12, 2016
1 parent e350e40 commit b9edf95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,16 @@ function unsafe_getvalue_notnull(X::NullableArray, I::Int...)
end

if VERSION >= v"0.5.0-dev+4697"
function Base.checkindex(::Type{Bool}, inds::UnitRange, i::Nullable)
function Base.checkindex(::Type{Bool}, inds::AbstractUnitRange, i::Nullable)
isnull(i) ? throw(NullException()) : checkindex(Bool, inds, get(i))
end

function Base.checkindex{N}(::Type{Bool}, inds::UnitRange, I::NullableArray{Bool, N})
function Base.checkindex{N}(::Type{Bool}, inds::AbstractUnitRange, I::NullableArray{Bool, N})
anynull(I) && throw(NullException())
checkindex(Bool, inds, I.values)
end

function Base.checkindex{T<:Real}(::Type{Bool}, inds::UnitRange, I::NullableArray{T})
function Base.checkindex{T<:Real}(::Type{Bool}, inds::AbstractUnitRange, I::NullableArray{T})
anynull(I) && throw(NullException())
b = true
for i in 1:length(I)
Expand Down

0 comments on commit b9edf95

Please sign in to comment.