From ddcad84f13037ae1e3d8b58ae66bd3c8f7b50d62 Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx.de>
Date: Tue, 28 Mar 2017 23:06:03 +0200
Subject: [PATCH] Clarify error message if model-local variable was already
 used on RHS

---
 ParsingDriver.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ParsingDriver.cc b/ParsingDriver.cc
index e0df6128..d370979e 100644
--- a/ParsingDriver.cc
+++ b/ParsingDriver.cc
@@ -2233,7 +2233,7 @@ ParsingDriver::declare_and_init_model_local_variable(string *name, expr_t rhs)
       // It can have already been declared in a steady_state_model block, check that it is indeed a ModelLocalVariable
       symb_id = mod_file->symbol_table.getID(*name);
       if (mod_file->symbol_table.getType(symb_id) != eModelLocalVariable)
-        error(*name + " has wrong type, you cannot use it within as left-hand side of a pound ('#') expression");
+        error(*name + " has wrong type or was already used on the right-hand side. You cannot use it on the left-hand side of a pound ('#') expression");
     }
 
   try
-- 
GitLab