Skip to content

Commit

Permalink
remove dep warnings for function calls on numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
TorkelE committed Jun 5, 2024
1 parent 12d8a4b commit d118fcc
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/rewrite-helpers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ end
replacenode(expr::Num, rules...; fixpoint = false) = _replacenode(unwrap(expr), rules...; fixpoint)
replacenode(expr::Symbolic, rules...; fixpoint = false) = _replacenode(unwrap(expr), rules...; fixpoint)
replacenode(expr::Symbolic, r::Pair, rules::Pair...; fixpoint = false) = _replacenode(expr, r, rules...; fixpoint)
replacenode(expr::Number, rules...; fixpoint = false) = expr
replacenode(expr::Number, r::Pair, rules::Pair...; fixpoint = false) = expr

function _replacenode(expr::Symbolic, rules...; fixpoint = false)
rs = map(r -> r isa Pair ? (x -> isequal(x, r[1]) ? r[2] : nothing) : r, rules)
Expand Down Expand Up @@ -84,7 +82,6 @@ end
Base.@deprecate occursin(r::Function, y::Union{Num, Symbolic}) hasnode(r::Function, y::Union{Num, Symbolic})
Base.@deprecate occursin(r::Num, y::Union{Num, Symbolic}) hasnode(r::Num, y::Union{Num, Symbolic})
Base.@deprecate occursin(r::Symbolic, y::Union{Num, Symbolic}) hasnode(r::Symbolic, y::Union{Num, Symbolic})
Base.@deprecate occursin(r::Union{Num, Symbolic, Function}, y::Number) hasnode(r::Union{Num, Symbolic, Function}, y::Number)

"""
filterchildren(c, x)
Expand Down

0 comments on commit d118fcc

Please sign in to comment.