Skip to content

Commit

Permalink
Add $OP for SafeInteger and Integer per review
Browse files Browse the repository at this point in the history
  • Loading branch information
mkitti committed Sep 10, 2021
1 parent 38dd988 commit 1080c72
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/binary_ops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ for OP in (:(<), :(<=), :(>=), :(>), :(!=), :(==), :isless, :isequal)
xx, yy = promote(x, y)
return $OP(xx, yy)
end
@inline function $OP(x::T1, y::T2) where {T1<:SafeInteger, T2<:Integer}
xx, yy = promote(x, y)
return $OP(xx, yy)
end
end
end

Expand Down

0 comments on commit 1080c72

Please sign in to comment.