]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/Case.java
(refs #7375) Replaced collectFreeVariables method by a visitor
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / Case.java
index c8f0eb893e15f7f58e5a6751b2435b05944b53c2..2669b4733fc328fc5376a2c310990cf24fe45c9c 100644 (file)
@@ -9,7 +9,6 @@ import org.simantics.scl.compiler.internal.parsing.Symbol;
 import org.simantics.scl.compiler.types.Type;
 
 import gnu.trove.map.hash.TObjectIntHashMap;
-import gnu.trove.set.hash.THashSet;
 import gnu.trove.set.hash.TIntHashSet;
 
 public class Case extends Symbol {
@@ -40,12 +39,6 @@ public class Case extends Symbol {
         value.collectVars(allVars, vars);
     }
 
-    public void collectFreeVariables(THashSet<Variable> vars) {
-        value.collectFreeVariables(vars);
-        for(int i=patterns.length-1;i>=0;--i)
-            patterns[i].removeFreeVariables(vars);
-    }
-
     public void resolve(TranslationContext context) {
         context.pushFrame();
         for(int i=0;i<patterns.length;++i)