Skip to content

Avoid overriding function in Base since v1.2 #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/Manifest.toml
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ os:
- osx
julia:
- 1.0
- 1.1
- 1.2
- nightly
notifications:
email: false
Expand Down
13 changes: 8 additions & 5 deletions src/predicates.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ Base.isless(x) = Fix2(isless, x)
islessequal(x) = Fix2(islessequal, x)
isgreater(x) = Fix2(isgreater, x)
isgreaterequal(x) = Fix2(isgreaterequal, x)
Base.:(<)(x) = Fix2(<, x)
Base.:(<=)(x) = Fix2(<=, x)
Base.:(>)(x) = Fix2(>, x)
Base.:(>=)(x) = Fix2(>=, x)
Base.:(!=)(x) = Fix2(!=, x)
if VERSION < v"1.2.0-DEV.257"
# Added to Base in https://github.com/JuliaLang/julia/pull/30915
Base.:(<)(x) = Fix2(<, x)
Base.:(<=)(x) = Fix2(<=, x)
Base.:(>)(x) = Fix2(>, x)
Base.:(>=)(x) = Fix2(>=, x)
Base.:(!=)(x) = Fix2(!=, x)
end
16 changes: 9 additions & 7 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ using SplitApplyCombine

@test isempty(detect_ambiguities(Base, AcceleratedArrays))

include("Interval.jl")
include("MaybeVector.jl")
include("SingleVector.jl")
@testset "AcceleratedArrays" begin
include("Interval.jl")
include("MaybeVector.jl")
include("SingleVector.jl")

include("HashIndex.jl")
include("UniqueHashIndex.jl")
include("SortIndex.jl")
include("UniqueSortIndex.jl")
include("HashIndex.jl")
include("UniqueHashIndex.jl")
include("SortIndex.jl")
include("UniqueSortIndex.jl")
end