Browse Source

Bugfix in STextInterpreter AssignmentExpression for nested assignments

Andreas Mülder 12 years ago
parent
commit
a51533a22c

+ 1 - 1
plugins/org.yakindu.sct.model.sexec.interpreter/src/org/yakindu/sct/model/sexec/interpreter/stext/StextStatementInterpreter.xtend

@@ -79,7 +79,7 @@ class StextStatementInterpreter extends AbstractStatementInterpreter {
 			var operator = AbstractStatementInterpreter::assignFunctionMap.get(assignment.operator.getName())
 			context.setSlotValue(scopeVariable.name, evaluate(operator, scopeVariable.getValue,result))
 		}
-		result		
+		context.getVariable(scopeVariable.name).value		
 	}
 	
 	

+ 4 - 1
plugins/org.yakindu.sct.model.sexec.interpreter/xtend-gen/org/yakindu/sct/model/sexec/interpreter/stext/StextStatementInterpreter.java

@@ -106,7 +106,10 @@ public class StextStatementInterpreter extends AbstractStatementInterpreter {
         Object _evaluate = this.evaluate(operator, _value, result);
         this.context.setSlotValue(_name_2, _evaluate);
       }
-      _xblockexpression = (result);
+      String _name_3 = scopeVariable.getName();
+      ExecutionVariable _variable_1 = this.context.getVariable(_name_3);
+      Object _value_1 = _variable_1.getValue();
+      _xblockexpression = (_value_1);
     }
     return _xblockexpression;
   }