Skip to content

Commit

Permalink
Remove overloading promote_type
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens authored Apr 19, 2024
1 parent 9d06993 commit 513c931
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/CxxWrap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ function Base.promote_rule(::Type{CT}, ::Type{JT}) where {CT <: CxxNumber, JT <:
end
return Base.promote_rule(julia_int_type(CT), JT)
end
Base.promote_type(::Type{T}, ::Type{T}) where {T<:CxxNumber} = julia_int_type(T)
Base.promote_rule(::Type{T}, ::Type{T}) where {T<:CxxNumber} = Base.promote_type(T,T)
Base.promote_rule(::Type{T}, ::Type{T}) where {T<:CxxNumber} = julia_int_type(T)
Base.promote_rule(::Type{T1}, ::Type{T2}) where {T1<:CxxNumber, T2<:CxxNumber} = Base.promote_rule(julia_int_type(T1), julia_int_type(T2))
Base.AbstractFloat(x::CxxNumber) = Base.AbstractFloat(to_julia_int(x))

Expand Down

0 comments on commit 513c931

Please sign in to comment.