2002-08-01 Miguel de Icaza <miguel@ximian.com>
authorMiguel de Icaza <miguel@gnome.org>
Thu, 1 Aug 2002 22:55:35 +0000 (22:55 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Thu, 1 Aug 2002 22:55:35 +0000 (22:55 -0000)
* expression.cs (Binary.ResolveOperator): Check error result in
two places.

svn path=/trunk/mcs/; revision=6341

mcs/mcs/ChangeLog
mcs/mcs/expression.cs

index 69caad3ab77a0247a013d77ccf1215dc77d63ca0..b5b49d223df2b0bdc9e720b37fe30cf66cac9f23 100755 (executable)
@@ -1,3 +1,8 @@
+2002-08-01  Miguel de Icaza  <miguel@ximian.com>
+
+       * expression.cs (Binary.ResolveOperator): Check error result in
+       two places.
+
 2002-08-02  Martin Baulig  <martin@gnome.org>
 
        * class.cs (TypeContainer.Define): Define all nested interfaces here.
index ac1170fdd57f57977457b434ae457b31c1d771ae..489585ecf3e33f15a08797c4debab68d39b5d6a1 100755 (executable)
@@ -2118,14 +2118,21 @@ namespace Mono.CSharp {
                                        temp = ConvertImplicit (ec, right, l, loc);
                                        if (temp != null)
                                                right = temp;
+                                       else {
+                                               Error_OperatorCannotBeApplied ();
+                                               return null;
+                                       }
                                } if (!lie){
                                        temp = ConvertImplicit (ec, left, r, loc);
                                        if (temp != null){
                                                left = temp;
                                                l = r;
+                                       } else {
+                                               Error_OperatorCannotBeApplied ();
+                                               return null;
                                        }
                                }
-                                
+
                                if (oper == Operator.Equality || oper == Operator.Inequality ||
                                    oper == Operator.LessThanOrEqual || oper == Operator.LessThan ||
                                    oper == Operator.GreaterThanOrEqual || oper == Operator.GreaterThan){