2005-09-05 Miguel de Icaza <miguel@novell.com>
[mono.git] / mcs / bmcs / cfold.cs
index 9465eaa20bf20c81abe6c397850477ffa83e8f63..346d981594eb804d70ff2e2973198ae38b501164 100644 (file)
@@ -160,8 +160,8 @@ namespace Mono.CSharp {
                                         (oper != Binary.Operator.Subtraction));
 
                                if (need_check &&
-                                   !Convert.ImplicitConversionExists (ec, match, other.Type)) {
-                                       Convert.Error_CannotImplicitConversion (loc, match.Type, other.Type);
+                                   !Convert.WideningConversionExists (ec, match, other.Type)) {
+                                       Convert.Error_CannotWideningConversion (loc, match.Type, other.Type);
                                        left = null;
                                        right = null;
                                        return;
@@ -999,7 +999,7 @@ namespace Mono.CSharp {
                                Binary.Error_OperatorCannotBeApplied (loc, ">>", lt, rt);
                                break;
 
-                       case Binary.Operator.LogicalAnd:
+                       case Binary.Operator.LogicalAndAlso:
                                if (left is BoolConstant && right is BoolConstant){
                                        return new BoolConstant (
                                                ((BoolConstant) left).Value &&
@@ -1007,7 +1007,7 @@ namespace Mono.CSharp {
                                }
                                break;
 
-                       case Binary.Operator.LogicalOr:
+                       case Binary.Operator.LogicalOrElse:
                                if (left is BoolConstant && right is BoolConstant){
                                        return new BoolConstant (
                                                ((BoolConstant) left).Value ||