As Steven said you are shadowing the function - think of it as overwriting the definition, so step!
is not related to DynamicalSystems.step!
at all.
Here’s a simple example:
julia> struct A end
julia> sum(x::A) = 5
sum (generic function with 1 method)
julia> sum(A())
5
julia> sum([1,2,3])
ERROR: MethodError: no method matching sum(::Vector{Int64})
You may have intended to import Base.sum
As you see, the sum
I created there has only 1 method, so there is nothing for multiple dispatch to do. For multiple dispatch to work I’d have import Base.sum
and extend it, like here (new session):
julia> struct A end
julia> import Base.sum
julia> Base.sum(x::A) = 5
julia> sum(A())
5
julia> sum([1,2,3])
6