Skip to content

Commit ac429cb

Browse files
committed
Remove special promote_op methods for comparison operators
They are not stricly needed, and create lots of ambiguities with Irrational methods.
1 parent b3cc517 commit ac429cb

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

base/operators.jl

-7
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,6 @@ const ≥ = >=
6161
.>=(x,y) = y .<= x
6262
const .≥ = .>=
6363

64-
for op in (<, >, <=, >=, (==))
65-
# to fix ambiguities
66-
@eval promote_op{R<:Number,S<:Number}(::$(typeof(op)), ::Type{R}, ::Type{S}) =
67-
($(Expr(:meta, :pure)); Bool)
68-
@eval promote_op{Op<:$(typeof(op))}(::Op, ::Any, ::Any) = ($(Expr(:meta, :pure)); Bool)
69-
end
70-
7164
# this definition allows Number types to implement < instead of isless,
7265
# which is more idiomatic:
7366
isless(x::Real, y::Real) = x<y

0 commit comments

Comments
 (0)