Fix bug introduced in previous commit that triggers a crash for DSGE-VAR models

pac-components
Sébastien Villemot 2021-09-08 18:59:46 +02:00
parent cb19ece049
commit 989347f448
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 3 additions and 2 deletions

View File

@ -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<int> 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)
{