Skip to content

Commit 90cc7c9

Browse files
fixup! fix: fix stack overflow for methods using symbolic_container to define a fallback
1 parent e2c4148 commit 90cc7c9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/index_provider_interface.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ parameter_index(indp, sym) = parameter_index(symbolic_container(indp), sym)
5959
Check whether the given `sym` is a timeseries parameter in `indp`.
6060
"""
6161
function is_timeseries_parameter(indp, sym)
62-
if hasmethod(symbolic_container, Tuple{typeof(indp)}) && (sc = symbolic_container(indp)) !== indp
62+
if hasmethod(symbolic_container, Tuple{typeof(indp)}) && (sc = symbolic_container(indp)) != indp
6363
is_timeseries_parameter(sc, sym)
6464
else
6565
return false
@@ -91,7 +91,7 @@ parameter in `indp`. Defaults to returning `nothing`. Respects the
9191
[`symbolic_container`](@ref) fallback for `indp` if present.
9292
"""
9393
function timeseries_parameter_index(indp, sym)
94-
if hasmethod(symbolic_container, Tuple{typeof(indp)}) && (sc = symbolic_container(indp)) !== indp
94+
if hasmethod(symbolic_container, Tuple{typeof(indp)}) && (sc = symbolic_container(indp)) != indp
9595
timeseries_parameter_index(symbolic_container(indp), sym)
9696
else
9797
return nothing
@@ -111,7 +111,7 @@ By default, this function returns `nothing`, indicating that the index provider
111111
support generating parameter observed functions.
112112
"""
113113
function parameter_observed(indp, sym)
114-
if hasmethod(symbolic_container, Tuple{typeof(indp)}) && (sc = symbolic_container(indp)) !== indp
114+
if hasmethod(symbolic_container, Tuple{typeof(indp)}) && (sc = symbolic_container(indp)) != indp
115115
return parameter_observed(symbolic_container(indp), sym)
116116
else
117117
return nothing
@@ -143,7 +143,7 @@ variable.
143143
By default, this function returns `Set([ContinuousTimeseries()])`.
144144
"""
145145
function get_all_timeseries_indexes(indp, sym)
146-
if hasmethod(symbolic_container, Tuple{typeof(indp)}) && (sc = symbolic_container(indp)) !== indp
146+
if hasmethod(symbolic_container, Tuple{typeof(indp)}) && (sc = symbolic_container(indp)) != indp
147147
return get_all_timeseries_indexes(symbolic_container(indp), sym)
148148
else
149149
return Set([ContinuousTimeseries()])
@@ -240,7 +240,7 @@ Return a dictionary mapping symbols in the index provider to their default value
240240
This includes parameter symbols. The dictionary must be mutable.
241241
"""
242242
function default_values(indp)
243-
if hasmethod(symbolic_container, Tuple{typeof(indp)}) && (sc = symbolic_container(indp)) !== indp
243+
if hasmethod(symbolic_container, Tuple{typeof(indp)}) && (sc = symbolic_container(indp)) != indp
244244
default_values(symbolic_container(indp))
245245
else
246246
Dict()

0 commit comments

Comments
 (0)