Skip to content

Commit

Permalink
Merge pull request #690 from devmotion/patch-1
Browse files Browse the repository at this point in the history
Fix method ambiguity error of `NaNMath.pow`
  • Loading branch information
ChrisRackauckas authored Jan 13, 2025
2 parents e577714 + 82d8e3e commit bf23a1d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ function number_methods(T, rhs1, rhs2, options=nothing)
end

push!(exprs, expr)

# Fix method ambiguity error on NaNMath >= 1.0.2 and promotion of `Integer`s on NaNMath < 1.0.2
if f === NaNMath.pow
push!(exprs, :((f::$(typeof(f)))(a::$T, b::Integer) = ($assert_like(f, Number, a); $term($(^), a, b))))
end
end

for f in (skip_basics ? monadic : only_basics ? basic_monadic : vcat(basic_monadic, monadic))
Expand Down

0 comments on commit bf23a1d

Please sign in to comment.