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%2Felaboration%2Fexpressions%2FEApply.java;h=1de0944ebd3d0dc80d9f66d285b4a4c02949f2bc;hp=8df327362560bc8574eefc96542d9e6f4da4de4a;hb=a8758de5bc19e5adb3f618d3038743a164f09912;hpb=12d9af17384d960b75d58c3935d2b7b46d93e87b diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EApply.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EApply.java index 8df327362..1de0944eb 100755 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EApply.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EApply.java @@ -37,8 +37,8 @@ import gnu.trove.set.hash.THashSet; import gnu.trove.set.hash.TIntHashSet; public class EApply extends Expression { - Expression function; - Expression[] parameters; + public Expression function; + public Expression[] parameters; Type effect = Types.NO_EFFECTS; public EApply(Expression function, Expression ... parameters) { @@ -397,4 +397,19 @@ public class EApply extends Expression { public Expression accept(ExpressionTransformer transformer) { return transformer.transform(this); } + + @Override + public boolean equalsExpression(Expression expression) { + if(expression.getClass() != getClass()) + return false; + EApply other = (EApply)expression; + if(parameters.length != other.parameters.length) + return false; + if(!function.equalsExpression(other.function)) + return false; + for(int i=0;i