X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftop%2FExpressionEvaluator.java;h=a5b9a65417e79e095acc83149f49d40ffa47690d;hp=2b42bc7bab865c75d8873ba8150504eb6aa47cc6;hb=78f577368ba4c71ad6fb3d9f16c03c634585cf7b;hpb=a88529426319d66aa668882d767efb3f58a1a629 diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/top/ExpressionEvaluator.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/top/ExpressionEvaluator.java index 2b42bc7ba..a5b9a6541 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/top/ExpressionEvaluator.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/top/ExpressionEvaluator.java @@ -236,7 +236,7 @@ public class ExpressionEvaluator { ArrayList lvTypes = new ArrayList(); if(expression instanceof EBlock) { EBlock block = (EBlock)expression; - if(localStorage != null && !(block.getStatements().getLast() instanceof GuardStatement)) { + if(localStorage != null && !(block.getLast() instanceof GuardStatement)) { THashSet localVariables = new THashSet(); ListIterator it = block.getStatements().listIterator(); while(it.hasNext()) { @@ -264,7 +264,7 @@ public class ExpressionEvaluator { localStorage.store(variableName, null, type); } } - if(!(block.getStatements().getLast() instanceof GuardStatement)) + if(!(block.getLast() instanceof GuardStatement)) block.addStatement(new GuardStatement(new EConstant(Builtins.TUPLE_CONSTRUCTORS[0]))); }