You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using result in an expression leads to a runtime error during interpretation. For example, the following code produces an error during the evaluation of the if's condition:
classA {
def boolean isX() {
if (result) {
}
result :=false;
}
}
The error is "Couldn't find the 'result' variable".
result = aqlEngine.eval(dummyAstResult, scopes.getCurrent().getVariableValues());
Since result has not been initialized yet, the map returned by scopes.getCurrent().getVariableValues() won't contain it. The appropriate fix depends on the chosen solution.
The text was updated successfully, but these errors were encountered:
Bug description
Using
result
in an expression leads to a runtime error during interpretation. For example, the following code produces an error during the evaluation of the if's condition:The error is "Couldn't find the 'result' variable".
Expected behavior
Not sure. One of the following:
result
is set a default value,How to reproduce
Steps to reproduce the behavior:
result
in an expression as shown aboveAdditional context
Issue caused by the following line:
ale-lang/plugins/org.eclipse.emf.ecoretools.ale.core/src/org/eclipse/emf/ecoretools/ale/core/interpreter/internal/MethodEvaluator.java
Line 688 in a1a0bf8
Since
result
has not been initialized yet, the map returned byscopes.getCurrent().getVariableValues()
won't contain it. The appropriate fix depends on the chosen solution.The text was updated successfully, but these errors were encountered: