X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Felaboration%2Fexpressions%2FELiteral.java;h=3f65de3b6f0a19249c99e49d28fc2f30ffa4ce0e;hp=388fbb37a1f426c1e435f77b9f12ba03a224cf84;hb=6dfe20b0f514b91337fcac4de0267ffd8268be07;hpb=ff1337ff96700fb157ec789cbef88b8f40e03798 diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ELiteral.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ELiteral.java index 388fbb37a..3f65de3b6 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ELiteral.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ELiteral.java @@ -1,6 +1,8 @@ package org.simantics.scl.compiler.elaboration.expressions; import java.util.ArrayList; +import java.util.Collections; +import java.util.Set; import org.simantics.scl.compiler.compilation.CompilationContext; import org.simantics.scl.compiler.constants.Constant; @@ -18,7 +20,6 @@ import org.simantics.scl.compiler.types.exceptions.MatchException; import org.simantics.scl.compiler.types.util.TypeUnparsingContext; import gnu.trove.map.hash.TObjectIntHashMap; -import gnu.trove.set.hash.THashSet; import gnu.trove.set.hash.TIntHashSet; public class ELiteral extends Expression { @@ -42,6 +43,11 @@ public class ELiteral extends Expression { public void collectVars(TObjectIntHashMap allVars, TIntHashSet vars) { } + + @Override + public Set getFreeVariables() { + return Collections.emptySet(); + } public void toString(StringBuilder b, TypeUnparsingContext tuc) { b.append(value); @@ -57,11 +63,6 @@ public class ELiteral extends Expression { return value; } - @Override - public void collectFreeVariables(THashSet vars) { - } - - @Override public Expression simplify(SimplificationContext context) { return this; @@ -87,10 +88,6 @@ public class ELiteral extends Expression { return new ELiteral(value); } - @Override - public void removeFreeVariables(THashSet vars) { - } - @Override public IExpression toIExpression(ExpressionInterpretationContext target) { return new IConstant(value.realizeValue(target.localClassBuilder));