Skip to content

Commit aa66dca

Browse files
authored
prevent adding methods to the functions > and >= (#108)
As documented, the intended way to implement `>` is to add a method to `<`. Similarly with `>=`. A package should never add a method to either `>` or `>=`.
1 parent 1c973b4 commit aa66dca

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

src/GLib/gvariant.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ GVariant(::Type{T},x) where T = GVariant(convert(T, x))
3636
Base.:(==)(lhs::GVariant, rhs::GVariant) = G_.equal(lhs,rhs)
3737
Base.:(<)(lhs::GVariant, rhs::GVariant) = G_.compare(lhs, rhs) < 0
3838
Base.:(<=)(lhs::GVariant, rhs::GVariant) = G_.compare(lhs, rhs) <= 0
39-
Base.:(>)(lhs::GVariant, rhs::GVariant) = G_.compare(lhs, rhs) > 0
40-
Base.:(>=)(lhs::GVariant, rhs::GVariant) = G_.compare(lhs, rhs) >= 0
4139

4240
variant_type_string(::Type{Bool}) = "b"
4341
variant_type_string(::Type{UInt8}) = "y"

src/text.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@ end
152152
Base.:(==)(lhs::TI, rhs::TI) = G_.equal(lhs, rhs)
153153
Base.:(<)(lhs::TI, rhs::TI) = G_.compare(lhs, rhs) < 0
154154
Base.:(<=)(lhs::TI, rhs::TI) = G_.compare(lhs, rhs) <= 0
155-
Base.:(>)(lhs::TI, rhs::TI) = G_.compare(lhs, rhs) > 0
156-
Base.:(>=)(lhs::TI, rhs::TI) = G_.compare(lhs, rhs) >= 0
157155

158156
start_(iter::TI) = Ref(iter)
159157
iterate(::TI, iter=start_(iter)) = iter.is_end ? nothing : (iter.char, iter + 1)

0 commit comments

Comments
 (0)