public override ITypeCheckType TypeCheck(ITypeEnvironment env)
{
ITypeCheckType a = Expr1.TypeCheck(env);
ITypeCheckType b = Expr2.TypeCheck(env);
if (!a.CompatibleWith(ExpressionUpperBound) || !a.CompatibleWith(b))
{
env.ReportError(String.Format("'&&' not possible. Incompatible types: '{0}', '{1}'. Only the bool type is supported.",
a, b), SourceStartPosition, SourceEndPosition);
return ExpressionUpperBound;
}
return a.GetLeastUpperBound(b);
}