From 989347f448e51dae1557f62826146975e4dc3640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Wed, 8 Sep 2021 18:59:46 +0200 Subject: [PATCH] Fix bug introduced in previous commit that triggers a crash for DSGE-VAR models --- src/ComputingTasks.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ComputingTasks.cc b/src/ComputingTasks.cc index 8cf7f930..9f00c2d7 100644 --- a/src/ComputingTasks.cc +++ b/src/ComputingTasks.cc @@ -1408,8 +1408,9 @@ AbstractEstimatedParamsStatement::commonCheckPass() const associated to other parameters in the same block (see issue #77) */ // First compute the symbol IDs of parameters declared in this block set declared_params; - transform(already_declared.begin(), already_declared.end(), inserter(declared_params, declared_params.end()), - [&](const string &name) { return symbol_table.getID(name); }); + for (const string &name : already_declared) + if (name != "dsge_prior_weight") + declared_params.insert(symbol_table.getID(name)); // Then look for (apparently) recursive definitions for (const auto &it : estim_params_list) {