]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EError.java
(refs #7375) Replaced collectFreeVariables method by a visitor
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / EError.java
index c7ea89b30678c8d15037241108028c509fdbe4de..def4087169b67abe35e91f15dd907e40864885e5 100644 (file)
@@ -14,7 +14,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;
 
 public class EError extends Expression {
@@ -24,33 +23,26 @@ public class EError extends Expression {
         setType(type);
     }
     
-    public EError() {     
+    public EError() {
     }
     
     public EError(long loc) {
         this(loc, Types.metaVar(Kinds.STAR));
     }
 
-       public void collectRefs(TObjectIntHashMap<Object> allRefs, TIntHashSet refs) {
+    @Override
+    public void collectVars(TObjectIntHashMap<Variable> allVars,
+            TIntHashSet vars) {
     }
-       
-       @Override
-       public void collectVars(TObjectIntHashMap<Variable> allVars,
-               TIntHashSet vars) {    
-       }
 
-       @Override
-       protected void updateType() throws MatchException {
-           setType(Types.metaVar(Kinds.STAR));     
-       }
-       
-       @Override
-       public IVal toVal(CompilationContext context, CodeWriter w) {
-        throw new UnsupportedOperationException();
+    @Override
+    protected void updateType() throws MatchException {
+        setType(Types.metaVar(Kinds.STAR));
     }
 
     @Override
-    public void collectFreeVariables(THashSet<Variable> vars) {
+    public IVal toVal(CompilationContext context, CodeWriter w) {
+        throw new UnsupportedOperationException();
     }
 
     @Override
@@ -67,10 +59,6 @@ public class EError extends Expression {
     public Expression inferType(TypingContext context) {
         return this;
     }
-
-    @Override
-    public void collectEffects(THashSet<Type> effects) {
-    }
     
     @Override
     public void setLocationDeep(long loc) {