Skip to content

Commit a38d47c

Browse files
committed
Fix method ambiguities
1 parent 8806b9c commit a38d47c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/intervals/arithmetic/power.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ Base.:^(x::Complex{<:Interval}, y::Complex{<:Interval}) = ^(promote(x, y)...)
7070
Base.:^(x::Complex{<:Interval}, y::Real) = ^(promote(x, y)...)
7171
Base.:^(x::Real, y::Complex{<:Interval}) = ^(promote(x, y)...)
7272
# needed to avoid method ambiguities
73+
Base.:^(x::Complex{<:Interval}, n::Bool) = ^(promote(x, n)...)
7374
Base.:^(x::Complex{<:Interval}, n::Integer) = ^(promote(x, n)...)
75+
Base.:^(x::Complex{<:Interval}, n::Rational) = ^(promote(x, n)...)
7476

7577
# overwrite behaviour for small integer powers from https://github.com/JuliaLang/julia/pull/24240
7678
# Base.literal_pow(::typeof(^), x::Interval, ::Val{n}) where {n} = x^n

0 commit comments

Comments
 (0)