Skip to content

Commit aaaac6e

Browse files
fix: fix type-change of time-dependent parameters with respecialize
1 parent af71cca commit aaaac6e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/systems/diffeqs/basic_transformations.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,9 +1037,11 @@ function respecialize(sys::AbstractSystem, mapping; all = false)
10371037
"""
10381038

10391039
if iscall(k)
1040-
op = operation(k)
1040+
op = operation(k)::BasicSymbolic
1041+
@assert !iscall(op)
1042+
op = SymbolicUtils.Sym{SymbolicUtils.FnType{Tuple{Any}, T}}(nameof(op))
10411043
args = arguments(k)
1042-
new_p = SymbolicUtils.term(op, args...; type = T)
1044+
new_p = op(args...)
10431045
else
10441046
new_p = SymbolicUtils.Sym{T}(getname(k))
10451047
end

0 commit comments

Comments
 (0)