Skip to content

Commit 562b77a

Browse files
fix: fix CacheWriter codegen with array symbolics
1 parent 2ef4392 commit 562b77a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/systems/nonlinear/nonlinearsystem.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ struct CacheWriter{F}
580580
end
581581

582582
function (cw::CacheWriter)(p, sols)
583-
cw.fn(p.caches..., sols, p...)
583+
cw.fn(p.caches, sols, p...)
584584
end
585585

586586
function CacheWriter(sys::AbstractSystem, buffer_types::Vector{TypeT},
@@ -594,10 +594,10 @@ function CacheWriter(sys::AbstractSystem, buffer_types::Vector{TypeT},
594594

595595
outsyms = [Symbol(:out, i) for i in eachindex(buffer_types)]
596596
body = map(eachindex(buffer_types), buffer_types) do i, T
597-
Symbol(:tmp, i) SetArray(true, outsyms[i], get(exprs, T, []))
597+
Symbol(:tmp, i) SetArray(true, :(out[$i]), get(exprs, T, []))
598598
end
599599
fn = Func(
600-
[outsyms..., DestructuredArgs(DestructuredArgs.(solsyms)),
600+
[:out, DestructuredArgs(DestructuredArgs.(solsyms)),
601601
DestructuredArgs.(rps)...],
602602
[],
603603
Let(body, :())

0 commit comments

Comments
 (0)