Skip to content

Commit c7d9a1a

Browse files
fix: fix type instability in late_binding_update_u0_p
1 parent 78791f2 commit c7d9a1a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/remake.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,10 @@ calling `SymbolicIndexingInterface.symbolic_container`, provided for dispatch. R
10831083
the updated `newu0` and `newp`.
10841084
"""
10851085
function late_binding_update_u0_p(prob, root_indp, u0, p, t0, newu0, newp)
1086+
if hasmethod(symbolic_container, Tuple{typeof(root_indp)}) &&
1087+
(sc = symbolic_container(root_indp)) !== root_indp
1088+
return late_binding_update_u0_p(prob.sc, u0, p, t0, newu0, newp)
1089+
end
10861090
return newu0, newp
10871091
end
10881092

@@ -1094,10 +1098,6 @@ Calls `late_binding_update_u0_p(prob, root_indp, u0, p, t0, newu0, newp)` after
10941098
"""
10951099
function late_binding_update_u0_p(prob, u0, p, t0, newu0, newp)
10961100
root_indp = prob
1097-
while hasmethod(symbolic_container, Tuple{typeof(root_indp)}) &&
1098-
(sc = symbolic_container(root_indp)) !== root_indp
1099-
root_indp = sc
1100-
end
11011101
return late_binding_update_u0_p(prob, root_indp, u0, p, t0, newu0, newp)
11021102
end
11031103

0 commit comments

Comments
 (0)