File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -119,13 +119,13 @@ end
119
119
120
120
@deprecate substitute_expr! (expr,s) substitute (expr,s)
121
121
122
- function states_to_sym (states)
122
+ function states_to_sym (states:: Set )
123
123
function _states_to_sym (O)
124
124
if O isa Equation
125
125
Expr (:(= ), _states_to_sym (O. lhs), _states_to_sym (O. rhs))
126
126
elseif O isa Term
127
127
if isa (O. op, Sym)
128
- any ( isequal (O), states) && return O. op. name # dependent variables
128
+ O in states && return O. op. name # dependent variables
129
129
return build_expr (:call , Any[O. op. name; _states_to_sym .(O. args)])
130
130
else
131
131
return build_expr (:call , Any[O. op; _states_to_sym .(O. args)])
@@ -137,6 +137,7 @@ function states_to_sym(states)
137
137
end
138
138
end
139
139
end
140
+ states_to_sym (states) = states_to_sym (Set (states))
140
141
141
142
"""
142
143
toparam(s::Sym) -> Sym{<:Parameter}
You can’t perform that action at this time.
0 commit comments