Skip to content

Commit

Permalink
Fix for buggy Base.isless impl (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
torfjelde authored Dec 28, 2022
1 parent e961ac2 commit 6d3d679
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "LogDensityProblems"
uuid = "6fdf6af0-433a-55f7-b3ed-c6c6e0b8df7c"
authors = ["Tamas K. Papp <[email protected]>"]
version = "2.0.0"
version = "2.0.1"

[deps]
ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197"
Expand Down
2 changes: 1 addition & 1 deletion src/LogDensityProblems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ end

LogDensityOrder(K::Integer) = LogDensityOrder{K}()

Base.isless(::LogDensityOrder{A}, ::LogDensityOrder{B}) where {A, B} = A B
Base.isless(::LogDensityOrder{A}, ::LogDensityOrder{B}) where {A, B} = A < B

"""
$(SIGNATURES)
Expand Down
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Base.show(io::IO, ::TestLogDensity) = print(io, "TestLogDensity")
@test LogDensityOrder(1) == LogDensityOrder(1)
@test_throws ArgumentError LogDensityOrder(-1)
@test LogDensityOrder(2) LogDensityOrder(1)
@test !(LogDensityOrder(1) > LogDensityOrder(1))
end

####
Expand Down

2 comments on commit 6d3d679

@devmotion
Copy link
Collaborator

Choose a reason for hiding this comment

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

@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/74710

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 the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v2.0.1 -m "<description of version>" 6d3d679441c4f9aa2724f1b09cfaecc23d0fb709
git push origin v2.0.1

Please sign in to comment.