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;fp=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftop%2FExpressionEvaluator.java;h=c1881fbca53acb2ffc20a21a01a4f4291ed77cb4;hp=d87beec65a7380361a2c45961fa41c2c886b8c18;hb=7045f0f516c243563976207abcec13a68891ff1d;hpb=fa9b9d56a9a16226e6409724cedfbbe94463b301 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 d87beec65..c1881fbca 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 @@ -253,7 +253,7 @@ public class ExpressionEvaluator { { TranslationContext context = new TranslationContext(compilationContext, localEnvironment); expression = expression.resolve(context); - if(!errorLog.isEmpty()) + if(!errorLog.hasNoErrors()) throw new SCLExpressionCompilationException(errorLog.getErrors()); } @@ -278,7 +278,7 @@ public class ExpressionEvaluator { expectedType.addPolarity(Polarity.POSITIVE); context.solveSubsumptions(expression.location); - if(!errorLog.isEmpty()) + if(!errorLog.hasNoErrors()) throw new SCLExpressionCompilationException(errorLog.getErrors()); if(decorateExpression && Types.canonical(expectedEffect) != Types.NO_EFFECTS) { ExpressionDecorator decorator = @@ -288,7 +288,7 @@ public class ExpressionEvaluator { expression = context.solveConstraints(environment, expression); expressionType = expression.getType(); - if(!errorLog.isEmpty()) + if(!errorLog.hasNoErrors()) throw new SCLExpressionCompilationException(errorLog.getErrors()); if(localEnvironment != null) @@ -319,7 +319,7 @@ public class ExpressionEvaluator { new SimplificationContext(compilationContext, DummyJavaReferenceValidator.INSTANCE); expression = expression.simplify(context); - if(!errorLog.isEmpty()) + if(!errorLog.hasNoErrors()) throw new SCLExpressionCompilationException(errorLog.getErrors()); if(SCLCompilerConfiguration.SHOW_EXPRESSION_BEFORE_EVALUATION)