Skip to content

Commit bc0d221

Browse files
committed
do not replace LazyBufferCache when promoting f
1 parent a98cc86 commit bc0d221

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/solve.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,8 @@ end
14211421
hasdualpromote(u0, t) = true
14221422

14231423
function promote_f(f::SplitFunction, ::Val{specialize}, u0, p, t) where {specialize}
1424-
typeof(f._func_cache) === typeof(u0) && isinplace(f) ? f :
1424+
(typeof(f._func_cache) === typeof(u0) ||
1425+
typeof(f._func_cache) == PreallocationTools.LazyBufferCache) && isinplace(f) ? f :
14251426
remake(f, _func_cache = zero(u0))
14261427
end
14271428
prepare_alg(alg, u0, p, f) = alg

0 commit comments

Comments
 (0)