Skip to content

Commit 1c6b3d8

Browse files
refactor: don't warn about system supertype for System
1 parent b87fa03 commit 1c6b3d8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/systems/abstractsystem.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,9 @@ Get the independent variable(s) of the system `sys`.
244244
See also [`@independent_variables`](@ref) and [`ModelingToolkit.get_iv`](@ref).
245245
"""
246246
function independent_variables(sys::AbstractSystem)
247-
@warn "Please declare ($(typeof(sys))) as a subtype of `AbstractTimeDependentSystem`, `AbstractTimeIndependentSystem` or `AbstractMultivariateSystem`."
247+
if !(sys isa System)
248+
@warn "Please declare ($(typeof(sys))) as a subtype of `AbstractTimeDependentSystem`, `AbstractTimeIndependentSystem` or `AbstractMultivariateSystem`."
249+
end
248250
if isdefined(sys, :iv)
249251
return [getfield(sys, :iv)]
250252
elseif isdefined(sys, :ivs)

0 commit comments

Comments
 (0)