Skip to content

Commit

Permalink
Test isequal(Num, ForwardDiff.Dual) ambiguity
Browse files Browse the repository at this point in the history
  • Loading branch information
hersle committed Aug 29, 2024
1 parent e0bde4a commit 3664e20
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/forwarddiff_symbolic_dual_ops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,10 @@ for f ∈ (hypot, muladd)
end

# fma is not defined for Symbolics.Num

# https://github.com/JuliaSymbolics/Symbolics.jl/issues/1246
@testset "isequal type ambiguity" begin
@variables x
xfunc(xval) = isequal(x, xval) ? xval : xval
@test ForwardDiff.derivative(xfunc, 0.0) == 1.0
end

0 comments on commit 3664e20

Please sign in to comment.