Skip to content

Commit b51ef8b

Browse files
committed
up
1 parent 476298a commit b51ef8b

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ HomotopyContinuation = "f213a82b-91d6-5c5d-acf7-10f1c761b327"
6464
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
6565
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
6666
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
67+
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
6768
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
6869
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
6970
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"

src/reaction_network.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,7 @@ function read_observed_options(options)
699699
for obs_eq in observed_eqs.args
700700
(obs_eq.args[1] != :~) && error("Malformed observable formula :\"$(obs_eq)\". Formula should contain two expressions separated by a '~'.")
701701
(obs_eq.args[2] isa Symbol) || error("Malformed observable formula :\"$(obs_eq)\". Left hand side should be a single symbol.")
702+
in(obs_eq.args[2], forbidden_symbols_error) && error("A forbidden symbol ($(obs_eq.args[2])) was used as an observable name.")
702703
push!(observed_vars.args, obs_eq.args[2])
703704
end
704705
else

test/dsl/dsl_options.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,4 +447,12 @@ let
447447
end
448448
(p,d), 0 <--> X1 + X2
449449
end
450+
451+
# A forbidden symbol used as observable name.
452+
@test_throws Exception @eval @reaction_network begin
453+
@observables begin
454+
t ~ X1 + X2
455+
end
456+
(p,d), 0 <--> X1 + X2
457+
end
450458
end

0 commit comments

Comments
 (0)