Skip to content

Commit 0537420

Browse files
Merge pull request #68 from SciML/as/backward-compat
fix: change `default_values` implementation for backward compatibility
2 parents 90c9138 + 8909408 commit 0537420

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/interface.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,13 @@ all_symbols(sys) = all_symbols(symbolic_container(sys))
140140
Return a dictionary mapping symbols in the system to their default value, if any. This
141141
includes parameter symbols. The dictionary must be mutable.
142142
"""
143-
default_values(sys) = default_values(symbolic_container(sys))
143+
function default_values(sys)
144+
if hasmethod(symbolic_container, Tuple{typeof(sys)})
145+
default_values(symbolic_container(sys))
146+
else
147+
Dict()
148+
end
149+
end
144150

145151
struct SolvedVariables end
146152

0 commit comments

Comments
 (0)