]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EApply.java
(refs #7375) Replaced collectVars method by a visitor
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / EApply.java
index 14366a4c9a366ea4e84711e20a319a79ae1998d4..02c7dff4585c95e0d55d7bf485266f90327b31e6 100644 (file)
@@ -32,9 +32,6 @@ import org.simantics.scl.compiler.types.exceptions.UnificationException;
 import org.simantics.scl.compiler.types.kinds.Kinds;
 import org.simantics.scl.compiler.types.util.MultiFunction;
 
-import gnu.trove.map.hash.TObjectIntHashMap;
-import gnu.trove.set.hash.TIntHashSet;
-
 public class EApply extends Expression {
     public Expression function;
     public Expression[] parameters;
@@ -74,15 +71,9 @@ public class EApply extends Expression {
     public Expression[] getParameters() {
         return parameters;
     }
-    
-    public void collectVars(TObjectIntHashMap<Variable> allVars, TIntHashSet vars) {
-        function.collectVars(allVars, vars);
-        for(Expression parameter : parameters)
-            parameter.collectVars(allVars, vars);
-    }
-       
-       @Override
-       protected void updateType() throws MatchException {
+
+    @Override
+    protected void updateType() throws MatchException {
         MultiFunction mfun = Types.matchFunction(function.getType(), parameters.length);
         /*for(int i=0;i<parameters.length;++i)
             if(!Types.equals(parameters[i].getType(), mfun.parameterTypes[i]))