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;
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]))