From: Miguel de Icaza Date: Tue, 8 Oct 2002 23:22:09 +0000 (-0000) Subject: 2002-10-08 Miguel de Icaza X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;ds=sidebyside;h=93d626fb4b3c50847e43a27b94ee4378fc9070b3;p=mono.git 2002-10-08 Miguel de Icaza * ecore.cs (Expression.ConvertExplicit): One codepath could return errors but not flag them. Fix this. Fixes #31853 svn path=/trunk/mcs/; revision=8080 --- diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog index e783edac500..3ba30162f8e 100755 --- a/mcs/mcs/ChangeLog +++ b/mcs/mcs/ChangeLog @@ -1,5 +1,8 @@ 2002-10-08 Miguel de Icaza + * ecore.cs (Expression.ConvertExplicit): One codepath could return + errors but not flag them. Fix this. Fixes #31853 + * parameter.cs (Resolve): Do not allow void as a parameter type. 2002-10-06 Martin Baulig diff --git a/mcs/mcs/ecore.cs b/mcs/mcs/ecore.cs index db2fb37825d..027ea74aa31 100755 --- a/mcs/mcs/ecore.cs +++ b/mcs/mcs/ecore.cs @@ -2217,7 +2217,12 @@ namespace Mono.CSharp { if (t != null) return t; - return ConvertNumericExplicit (ec, e, target_type, loc); + t = ConvertNumericExplicit (ec, e, target_type, loc); + if (t != null) + return t; + + Error_CannotConvertType (loc, expr_type, target_type); + return null; } ne = ConvertReferenceExplicit (expr, target_type);