You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
isempty(ivs) ||error("An observable ($obs_name) was given independent variable(s). These should not be given, as they are inferred automatically.")
704
705
isnothing(defaults) ||error("An observable ($obs_name) was given a default value. This is forbidden.")
705
706
in(obs_name, forbidden_symbols_error) &&error("A forbidden symbol ($(obs_eq.args[2])) was used as an observable name.")
706
-
(obs_name in species_declared) &&continue
707
+
if (obs_name in species_declared)
708
+
isnothing(metadata) ||error("Metadata was provided to observable $obs_name in the `@observables` macro. However, the obervable was also declared separately (using either @species or @variables). When this is done, metadata cannot be provided within the @observables declaration.")
709
+
continue
710
+
end
707
711
708
712
# Appends (..) to the observable (which is later replaced with the extracted ivs).
709
713
# Adds the observable to the first line of the output expression (starting with `@variables`).
@@ -713,11 +717,13 @@ function read_observed_options(options, species_declared)
713
717
# Adds a line to the `observed_vars` expression, setting the ivs for this observable.
714
718
# Cannot extract directly using e.g. "getfield.(dependants_structs, :reactant)" because
715
719
# then we get something like :([:X1, :X2]), rather than :([X1, X2]).
0 commit comments