]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ETypeAnnotation.java
(refs #7375) Replaced collectVars method by a visitor
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / ETypeAnnotation.java
index 568b3c10818ea47740e3492b202c9b55e4e3f263..713342ed568cedd6b1e747743a394d967158d64d 100644 (file)
@@ -8,12 +8,8 @@ import org.simantics.scl.compiler.internal.parsing.types.TypeAst;
 import org.simantics.scl.compiler.types.Type;
 import org.simantics.scl.compiler.types.exceptions.MatchException;
 
-import gnu.trove.map.hash.TObjectIntHashMap;
-import gnu.trove.set.hash.THashSet;
-import gnu.trove.set.hash.TIntHashSet;
-
 public class ETypeAnnotation extends SimplifiableExpression {
-    Expression value;
+    public Expression value;
     Type type;
     TypeAst typeAst;
         
@@ -28,24 +24,9 @@ public class ETypeAnnotation extends SimplifiableExpression {
         this.type = type;
     }
 
-       public void collectRefs(TObjectIntHashMap<Object> allRefs, TIntHashSet refs) {
-        value.collectRefs(allRefs, refs);
-    }
-       
-       @Override
-       public void collectVars(TObjectIntHashMap<Variable> allVars,
-               TIntHashSet vars) {
-           value.collectVars(allVars, vars);
-       }
-
-       @Override
-       protected void updateType() throws MatchException {
-           setType(type);
-       }
-
     @Override
-    public void collectFreeVariables(THashSet<Variable> vars) {
-        value.collectFreeVariables(vars);
+    protected void updateType() throws MatchException {
+        setType(type);
     }
 
     @Override
@@ -72,11 +53,6 @@ public class ETypeAnnotation extends SimplifiableExpression {
         return value.checkType(context, type);
     }
     
-    @Override
-    public void collectEffects(THashSet<Type> effects) {
-        value.collectEffects(effects);
-    }
-    
     @Override
     public void setLocationDeep(long loc) {
         if(location == Locations.NO_LOCATION) {
@@ -93,11 +69,6 @@ public class ETypeAnnotation extends SimplifiableExpression {
     public Expression getValue() {
         return value;
     }
-
-    @Override
-    public void forVariables(VariableProcedure procedure) {
-        value.forVariables(procedure);
-    }
     
     @Override
     public Expression accept(ExpressionTransformer transformer) {