import org.simantics.scl.compiler.types.util.TypeUnparsingContext;
import gnu.trove.map.hash.THashMap;
-import gnu.trove.map.hash.TObjectIntHashMap;
-import gnu.trove.set.hash.THashSet;
-import gnu.trove.set.hash.TIntHashSet;
public class EAmbiguous extends SimplifiableExpression {
public static final boolean DEBUG = false;
boolean[] active;
int activeCount;
transient TypingContext context;
- Expression resolvedExpression;
+ public Expression resolvedExpression;
public abstract static class Alternative {
public abstract Type getType();
this.activeCount = alternatives.length;
}
- @Override
- public void collectVars(TObjectIntHashMap<Variable> allVars,
- TIntHashSet vars) {
- }
-
@Override
protected void updateType() throws MatchException {
throw new InternalCompilerError();
StringBuilder b = new StringBuilder();
b.append("Expected <");
requiredType.toString(new TypeUnparsingContext(), b);
- b.append(">, but no alteratives match the type: ");
+ b.append(">, but no alternatives match the type: ");
for(int i=0;i<alternatives.length;++i) {
b.append("\n ");
b.append(alternatives[i]);
listenType();
return this;
}
-
- @Override
- public void collectFreeVariables(THashSet<Variable> vars) {
- }
@Override
public Expression resolve(TranslationContext context) {