When redefining a subfunction I always have to go back and redefine the top level function since otherwise it continues to use the old definition of the subfunction. Is there a way around this? I have played with @noinline and starting julia with --optimise=0 but it doesn’t seem to help. The REPL session below illustrates what I am talking about.
julia> a()=b()
a (generic function with 1 method)
julia> b()=1
b (generic function with 1 method)
julia> a()
1
julia> b()=2
WARNING: Method definition b() in module Main at REPL[2]:1 overwritten at REPL[4]:1.
b (generic function with 1 method)
julia> a()
1