From: Miguel de Icaza Date: Thu, 1 Aug 2002 22:55:35 +0000 (-0000) Subject: 2002-08-01 Miguel de Icaza X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=ac452caaf92608fc809e1f0c37c39004545f5f33;p=mono.git 2002-08-01 Miguel de Icaza * expression.cs (Binary.ResolveOperator): Check error result in two places. svn path=/trunk/mcs/; revision=6341 --- diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog index 69caad3ab77..b5b49d223df 100755 --- a/mcs/mcs/ChangeLog +++ b/mcs/mcs/ChangeLog @@ -1,3 +1,8 @@ +2002-08-01 Miguel de Icaza + + * expression.cs (Binary.ResolveOperator): Check error result in + two places. + 2002-08-02 Martin Baulig * class.cs (TypeContainer.Define): Define all nested interfaces here. diff --git a/mcs/mcs/expression.cs b/mcs/mcs/expression.cs index ac1170fdd57..489585ecf3e 100755 --- a/mcs/mcs/expression.cs +++ b/mcs/mcs/expression.cs @@ -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){