Skip to content

Commit

Permalink
Revert "Update rewrite-helpers.jl"
Browse files Browse the repository at this point in the history
This reverts commit 9b98a03.
  • Loading branch information
ChrisRackauckas committed Jun 5, 2024
1 parent a7f3d28 commit ac00f04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rewrite-helpers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ hasnode(Symbolics.is_derivative, X + D(X) + D(X^2)) # returns `true`.
function hasnode(r::Function, y::Union{Num, Symbolic})
_hasnode(r, y)
end
hasnode(r::Num, y::Union{Num, Symbolic}) = hasnode(unwrap(r), unwrap(y))
hasnode(r::Symbolic, y::Union{Num, Symbolic}) = hasnode(unwrap(r), unwrap(y))
hasnode(r::Num, y::Union{Num, Symbolic}) = occursin(unwrap(r), unwrap(y))
hasnode(r::Symbolic, y::Union{Num, Symbolic}) = occursin(unwrap(r), unwrap(y))
hasnode(r::Union{Num, Symbolic, Function}, y::Number) = false

function _hasnode(r, y)
Expand Down

0 comments on commit ac00f04

Please sign in to comment.