Skip to content

Commit

Permalink
Update src/systems/model_parsing.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Fredrik Bagge Carlson <[email protected]>
  • Loading branch information
ChrisRackauckas and baggepinnen authored Aug 8, 2024
1 parent eff05fb commit 99b0138
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/systems/model_parsing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ singular(sym) = last(string(sym)) == 's' ? Symbol(string(sym)[1:(end - 1)]) : sy

function check_name_uniqueness(dict, a, newvarclass)
for varclass in [:variables, :parameters, :structural_parameters, :constants]
if haskey(dict, varclass) && a in keys(dict[varclass])
dvarclass = get(dict, varclass, nothing)
if dvarclass !== nothing && a in keys(dvarclass)
error("Cannot create a $(singular(newvarclass)) `$(a)` because there is already a $(singular(varclass)) with that name")
end
end
Expand Down

0 comments on commit 99b0138

Please sign in to comment.