Skip to content

Commit c285a36

Browse files
author
oscarddssmith
committed
fix #527
1 parent 43fc8d3 commit c285a36

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/common.jl

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,15 @@ function SciMLBase.reinit!(cache::LinearCache;
243243
typeof(sensealg)}(A, b, u, p, alg, cacheval, isfresh, Pl, Pr, abstol, reltol,
244244
maxiters, verbose, assumptions, sensealg)
245245
else
246-
cache.A = A
247-
cache.b = b
248-
cache.u = u
249-
cache.p = p
250-
cache.Pl = Pl
251-
cache.Pr = Pr
252-
cache.isfresh = true
246+
# setfield! to bypass the setproperty! overloads
247+
setfield!(cache, :A, A)
248+
setfield!(cache, :b, b)
249+
setfield!(cache, :u, u)
250+
setfield!(cache, :p, :p)
251+
setfield!(cache, :A, A)
252+
setfield!(cache, :Pl, Pl)
253+
setfield!(cache, :Pr, Pr)
254+
setfield!(cache, :isfresh, true)
253255
end
254256
end
255257

0 commit comments

Comments
 (0)