Skip to content

Commit

Permalink
Merge pull request #68 from SciML/as/backward-compat
Browse files Browse the repository at this point in the history
fix: change `default_values` implementation for backward compatibility
  • Loading branch information
ChrisRackauckas authored Apr 17, 2024
2 parents 90c9138 + 8909408 commit 0537420
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,13 @@ all_symbols(sys) = all_symbols(symbolic_container(sys))
Return a dictionary mapping symbols in the system to their default value, if any. This
includes parameter symbols. The dictionary must be mutable.
"""
default_values(sys) = default_values(symbolic_container(sys))
function default_values(sys)
if hasmethod(symbolic_container, Tuple{typeof(sys)})
default_values(symbolic_container(sys))
else
Dict()
end
end

struct SolvedVariables end

Expand Down

0 comments on commit 0537420

Please sign in to comment.