Skip to content
Snippets Groups Projects
Verified Commit 8207886e authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Fix logic for @#ifndef

Ref. dynare#1747

(cherry picked from commit df8d8ef1)
parent 5d461c0b
No related branches found
No related tags found
No related merge requests found
......@@ -306,8 +306,8 @@ Ifndef::interpret(ostream &output, vector<filesystem::path> &paths)
{
for (const auto & [expr, body] : expr_and_body)
if (VariablePtr vp = dynamic_pointer_cast<Variable>(expr);
!(dynamic_pointer_cast<BaseType>(expr)
|| (vp && env.isVariableDefined(vp->getName()))))
dynamic_pointer_cast<BaseType>(expr)
|| (vp && !env.isVariableDefined(vp->getName())))
{
interpretBody(body, output, paths);
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment