X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Felaboration%2Fexpressions%2FETypeAnnotation.java;h=713342ed568cedd6b1e747743a394d967158d64d;hb=a04614760395f09f5e9e3d38226b72f1b8e3d7ba;hp=654b4ef1f47555395924b0ac3f7db94a22417cbc;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ETypeAnnotation.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ETypeAnnotation.java index 654b4ef1f..713342ed5 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ETypeAnnotation.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ETypeAnnotation.java @@ -4,17 +4,12 @@ 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; -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; @@ -29,24 +24,9 @@ public class ETypeAnnotation extends SimplifiableExpression { this.type = type; } - public void collectRefs(TObjectIntHashMap allRefs, TIntHashSet refs) { - value.collectRefs(allRefs, refs); - } - - @Override - public void collectVars(TObjectIntHashMap allVars, - TIntHashSet vars) { - value.collectVars(allVars, vars); - } - - @Override - protected void updateType() throws MatchException { - setType(type); - } - @Override - public void collectFreeVariables(THashSet vars) { - value.collectFreeVariables(vars); + protected void updateType() throws MatchException { + setType(type); } @Override @@ -72,17 +52,6 @@ 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 effects) { - value.collectEffects(effects); - } @Override public void setLocationDeep(long loc) { @@ -100,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) {