]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ELet.java
(refs #7375) Replaced collectFreeVariables method by a visitor
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / ELet.java
index 71ee13076912142a36c43451b6d3411aa7360347..71195352405ecf2c2ce35ba5010bd5e814982162 100644 (file)
@@ -21,7 +21,6 @@ import org.simantics.scl.compiler.types.exceptions.MatchException;
 import org.simantics.scl.compiler.types.kinds.Kinds;
 
 import gnu.trove.map.hash.TObjectIntHashMap;
-import gnu.trove.set.hash.THashSet;
 import gnu.trove.set.hash.TIntHashSet;
 
 /**
@@ -118,15 +117,6 @@ public class ELet extends Expression {
         return result;
     }
 
-    @Override
-    public void collectFreeVariables(THashSet<Variable> vars) {
-        in.collectFreeVariables(vars);
-        for(Assignment assign : assignments)
-            assign.value.collectFreeVariables(vars);
-        for(Assignment assign : assignments) 
-            assign.pattern.removeFreeVariables(vars);
-    }
-
     @Override
     public Expression resolve(TranslationContext context) {
         throw new InternalCompilerError("ELet should be already resolved.");