diff --git a/src/remake.jl b/src/remake.jl index a03c11ec5..5c001abac 100644 --- a/src/remake.jl +++ b/src/remake.jl @@ -126,8 +126,9 @@ end Remake the given `BVProblem`. """ -function remake(prob::BVProblem; f = missing, bc = missing, u0 = missing, tspan = missing, - p = missing, kwargs = missing, problem_type = missing, _kwargs...) +function remake(prob::BVProblem{uType, tType, iip, nlls}; f = missing, bc = missing, + u0 = missing, tspan = missing, p = missing, kwargs = missing, problem_type = missing, + _kwargs...) where {uType, tType, iip, nlls} if tspan === missing tspan = prob.tspan end @@ -143,8 +144,6 @@ function remake(prob::BVProblem; f = missing, bc = missing, u0 = missing, tspan end end - iip = isinplace(prob) - if problem_type === missing problem_type = prob.problem_type end @@ -175,9 +174,10 @@ function remake(prob::BVProblem; f = missing, bc = missing, u0 = missing, tspan end if kwargs === missing - BVProblem{iip}(_f, bc, u0, tspan, p; problem_type, prob.kwargs..., _kwargs...) + BVProblem{iip}(_f, bc, u0, tspan, p; problem_type, nlls=Val(nlls), prob.kwargs..., + _kwargs...) else - BVProblem{iip}(_f, bc, u0, tspan, p; problem_type, kwargs...) + BVProblem{iip}(_f, bc, u0, tspan, p; problem_type, nlls=Val(nlls), kwargs...) end end