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;
this.type = type;
}
- @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);
- }
-
@Override
public Expression simplify(SimplificationContext context) {
return value.simplify(context);
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) {