DiffEqBase.jl
DiffEqBase.jl copied to clipboard
Fix closures
In line with https://github.com/JuliaDiffEq/DelayDiffEq.jl/pull/130, we should also fix all closures in DiffEqBase (and possibly other JuliaDiffEq packages) that access closed over variables since apparently it's behaviour is undefined. This issue appears, e.g., in the constructor of DiffEqFunctions (https://github.com/JuliaDiffEq/DiffEqBase.jl/blob/master/src/diffeqfunction.jl#L269 and similar lines) and in the root finding of callbacks (lines such as https://github.com/JuliaDiffEq/DiffEqBase.jl/blob/master/src/callbacks.jl#L417-L420).