From b16ab9b247e38ccac74472cbdf27288a0c2c9ba0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Wed, 21 Jul 2021 14:26:38 +0200
Subject: [PATCH] =?UTF-8?q?Fix=20preprocessor=20crash=20when=20a=20[static?=
 =?UTF-8?q?]=20equation=20contains=20a=20=E2=80=9Cvar=5Fexpectation?=
 =?UTF-8?q?=E2=80=9D=20operator?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Rather error out with a meaningful message.
---
 src/ExprNode.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/ExprNode.cc b/src/ExprNode.cc
index a0fb1309..cc8185c5 100644
--- a/src/ExprNode.cc
+++ b/src/ExprNode.cc
@@ -8258,8 +8258,7 @@ VarExpectationNode::removeTrendLeadLag(const map<int, expr_t> &trend_symbols_map
 bool
 VarExpectationNode::isInStaticForm() const
 {
-  cerr << "VarExpectationNode::isInStaticForm not implemented." << endl;
-  exit(EXIT_FAILURE);
+  return false;
 }
 
 bool
-- 
GitLab