Unverified Commit df8d8ef1 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Fix logic for @#ifndef

Ref. dynare#1747
parent abf5a655
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment