Skip to content

Commit b921da8

Browse files
fix: make independent_variables type-stable
1 parent 5b47bea commit b921da8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/systems/abstractsystem.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ See also [`@independent_variables`](@ref) and [`ModelingToolkit.get_iv`](@ref).
9494
"""
9595
function independent_variables(sys::AbstractSystem)
9696
if isdefined(sys, :iv) && getfield(sys, :iv) !== nothing
97-
return [getfield(sys, :iv)]
97+
return SymbolicT[getfield(sys, :iv)]
9898
elseif isdefined(sys, :ivs)
99-
return getfield(sys, :ivs)
99+
return getfield(sys, :ivs)::Vector{SymbolicT}
100100
else
101-
return []
101+
return SymbolicT[]
102102
end
103103
end
104104

0 commit comments

Comments
 (0)