From 56c0af0b7ed2de531e194d5bc8a53eb733eeccd0 Mon Sep 17 00:00:00 2001
From: ferhat <ferhat@ac1d8469-bf42-47a9-8791-bf33cf982152>
Date: Fri, 23 Jan 2009 14:09:24 +0000
Subject: [PATCH] Find the temporary terms even in local model variables

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2373 ac1d8469-bf42-47a9-8791-bf33cf982152
---
 preprocessor/ExprNode.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/preprocessor/ExprNode.cc b/preprocessor/ExprNode.cc
index 359ded42db..a2a6f90836 100644
--- a/preprocessor/ExprNode.cc
+++ b/preprocessor/ExprNode.cc
@@ -252,6 +252,8 @@ VariableNode::collectTemporary_terms(const temporary_terms_type &temporary_terms
   temporary_terms_type::const_iterator it = temporary_terms.find(const_cast<VariableNode *>(this));
   if (it != temporary_terms.end())
     ModelBlock->Block_List[Curr_Block].Temporary_InUse->insert(idx);
+  if(type== eModelLocalVariable)
+    datatree.local_variables_table[symb_id]->collectTemporary_terms(temporary_terms, ModelBlock, Curr_Block);
 }
 
 void
-- 
GitLab