]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ETypeAnnotation.java
(refs #7375) Replace collectRefs by CollectRefsVisitor
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / ETypeAnnotation.java
index 654b4ef1f47555395924b0ac3f7db94a22417cbc..10c8e6f7a47e4511bc177e4d3cfd29071a08cbfc 100644 (file)
@@ -4,7 +4,6 @@ import org.simantics.scl.compiler.elaboration.contexts.SimplificationContext;
 import org.simantics.scl.compiler.elaboration.contexts.TranslationContext;
 import org.simantics.scl.compiler.elaboration.contexts.TypingContext;
 import org.simantics.scl.compiler.errors.Locations;
-import org.simantics.scl.compiler.internal.elaboration.utils.ExpressionDecorator;
 import org.simantics.scl.compiler.internal.parsing.types.TypeAst;
 import org.simantics.scl.compiler.types.Type;
 import org.simantics.scl.compiler.types.exceptions.MatchException;
@@ -29,20 +28,16 @@ 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
-       public void collectVars(TObjectIntHashMap<Variable> allVars,
-               TIntHashSet vars) {
-           value.collectVars(allVars, vars);
-       }
 
-       @Override
-       protected void updateType() throws MatchException {
-           setType(type);
-       }
+    @Override
+    protected void updateType() throws MatchException {
+        setType(type);
+    }
 
     @Override
     public void collectFreeVariables(THashSet<Variable> vars) {
@@ -72,13 +67,7 @@ public class ETypeAnnotation extends SimplifiableExpression {
     public Expression inferType(TypingContext context) {
         return value.checkType(context, type);
     }
-
-    @Override
-    public Expression decorate(ExpressionDecorator decorator) {
-        value = value.decorate(decorator);
-        return decorator.decorate(this);
-    }
-
+    
     @Override
     public void collectEffects(THashSet<Type> effects) {
         value.collectEffects(effects);
@@ -100,11 +89,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) {