Author: miguel
Date: 2005-04-16 15:30:08 -0400 (Sat, 16 Apr 2005)
New Revision: 43126

Modified:
   trunk/mcs/mcs/ChangeLog
   trunk/mcs/mcs/expression.cs
Log:
2005-04-16  Miguel de Icaza  <[EMAIL PROTECTED]>

        * expression.cs (Binary.ResolveOperator): Apply patch from John
        Luke to fix bug 59864: operators &, | and ^ on enumerations
        require that the same enum type on both sides.

Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog     2005-04-16 19:28:59 UTC (rev 43125)
+++ trunk/mcs/mcs/ChangeLog     2005-04-16 19:30:08 UTC (rev 43126)
@@ -1,5 +1,9 @@
 2005-04-16  Miguel de Icaza  <[EMAIL PROTECTED]>
 
+       * expression.cs (Binary.ResolveOperator): Apply patch from John
+       Luke to fix bug 59864: operators &, | and ^ on enumerations
+       require that the same enum type on both sides.
+
        * driver.cs: Add warnings to old flag usage, this is to assist
        people who produce Makefiles and hope that the Makefiles will be
        used on Windows.

Modified: trunk/mcs/mcs/expression.cs
===================================================================
--- trunk/mcs/mcs/expression.cs 2005-04-16 19:28:59 UTC (rev 43125)
+++ trunk/mcs/mcs/expression.cs 2005-04-16 19:30:08 UTC (rev 43126)
@@ -2580,6 +2580,10 @@
                                if (oper == Operator.BitwiseAnd ||
                                    oper == Operator.BitwiseOr ||
                                    oper == Operator.ExclusiveOr){
+                                       if (left.Type != right.Type){
+                                               Error_OperatorCannotBeApplied 
();
+                                               return null;
+                                       }
                                        type = l;
                                        return this;
                                }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to