Skip to content

Commit cef5f24

Browse files
fix: improve type-stability of discover_globalscoped
1 parent 41ca68b commit cef5f24

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
@@ -604,9 +604,9 @@ end
604604
Find [`GlobalScope`](@ref)d variables in `sys` and add them to the unknowns/parameters.
605605
"""
606606
function discover_globalscoped(sys::AbstractSystem)
607-
newunknowns = OrderedSet()
608-
newparams = OrderedSet()
609-
iv = has_iv(sys) ? get_iv(sys) : nothing
607+
newunknowns = OrderedSet{SymbolicT}()
608+
newparams = OrderedSet{SymbolicT}()
609+
iv::Union{SymbolicT, Nothing} = has_iv(sys) ? get_iv(sys) : nothing
610610
collect_scoped_vars!(newunknowns, newparams, sys, iv; depth = -1)
611611
setdiff!(newunknowns, observables(sys))
612612
@set! sys.ps = unique!(vcat(get_ps(sys), collect(newparams)))

0 commit comments

Comments
 (0)