Skip to content

Commit

Permalink
Bugfix: compatibility with Julia 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
perrutquist committed Feb 17, 2020
1 parent b47a9bc commit 8fd5c85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/LengthRanges.jl
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,10 @@ end
LengthUnitRange{T}(zeroth(r) + zeroth(s)*step(r), length(s))
end

@inline Base.getindex(r::Base.IdentityUnitRange, s::LengthUnitRange{<:Integer}) = (@boundscheck checkbounds(r, s); s) # disambig
@inline Base.getindex(r::Base.Slice, s::LengthUnitRange{<:Integer}) = (@boundscheck checkbounds(r, s); s) # disambig
if VERSION >= v"1.1"
@inline Base.getindex(r::Base.IdentityUnitRange, s::LengthUnitRange{<:Integer}) = (@boundscheck checkbounds(r, s); s) # disambig
@inline Base.getindex(r::Base.Slice, s::LengthUnitRange{<:Integer}) = (@boundscheck checkbounds(r, s); s) # disambig
end

"""
StaticOneTo{N} - Like Base.OneTo{Int}(N) but with the length fixed by the type.
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ include("SIMD_test.jl")
for a in ambiguities
println(a[1], "\n", a[2], "\n")
end
@test length(ambiguities) <= 5
@test length(ambiguities) <= 6
end

# Run all tests in optional packages, together with StaticNumbers,
Expand Down

2 comments on commit 8fd5c85

@perrutquist
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/9630

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.2 -m "<description of version>" 8fd5c85e4c72ce753f5f9cc6324d37306c1d37a1
git push origin v0.3.2

Please sign in to comment.