SciML / Catalyst.jl

Chemical reaction network and systems biology interface for scientific machine learning (SciML). High performance, GPU-parallelized, and O(1) solvers in open source software.
https://docs.sciml.ai/Catalyst/stable/
Other
463 stars 78 forks source link

Unrechable code in latexify code #972

Closed TorkelE closed 2 months ago

TorkelE commented 4 months ago

In this function:

function Latexify.infer_output(env, rs::ReactionSystem, args...)
    env in [:arrows, :chem, :chemical, :arrow] && return chemical_arrows

    error("The environment $env is not defined.")
    latex_function = Latexify.get_latex_function(rs, args...)

    return latex_function
end

The last two lines cannot be reached, as an error would be thrown before

TorkelE commented 4 months ago

Either the last two lines should be removed, or there is something here which is not working as intended.