Skip to content

Commit

Permalink
Add promote rule for Bool
Browse files Browse the repository at this point in the history
  • Loading branch information
anj1 committed Dec 8, 2023
1 parent c7e0f89 commit ba3e6fa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/promote.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ convert(::Type{T}, x::Number) where {T<:AlgebraicNumber} = AlgebraicNumber(x)
# promotions
promote_rule(x::Type{T}, y::Type{AlgebraicNumber{S,F}}) where {T<:Integer,S,F} = AlgebraicNumber
promote_rule(x::Type{Rational{T}},y::Type{AlgebraicNumber{S,F}}) where {T<:Integer,S,F} = AlgebraicNumber
promote_rule(::Type{Bool}, ::Type{AlgebraicNumber{S, F}}) where {S, F} = AlgebraicNumber

# conversions back
function convert(::Type{Int64},an::AlgebraicNumber)
Expand Down

0 comments on commit ba3e6fa

Please sign in to comment.