Author: marek
Date: 2007-11-07 05:31:37 -0500 (Wed, 07 Nov 2007)
New Revision: 89085

Modified:
   trunk/mcs/mcs/ChangeLog
   trunk/mcs/mcs/expression.cs
Log:
2007-11-07  Marek Safar  <[EMAIL PROTECTED]>

        A fix for bug #325101
        * expression.cs: Do type not value comparison for `is' expression.
        


Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog     2007-11-07 10:27:26 UTC (rev 89084)
+++ trunk/mcs/mcs/ChangeLog     2007-11-07 10:31:37 UTC (rev 89085)
@@ -1,5 +1,10 @@
 2007-11-07  Marek Safar  <[EMAIL PROTECTED]>
 
+       A fix for bug #325101
+       * expression.cs: Do type not value comparison for `is' expression.
+
+2007-11-07  Marek Safar  <[EMAIL PROTECTED]>
+
        A fix for bug #320236
        * convert.cs: Don't apply user conversion on underlying target type.
 

Modified: trunk/mcs/mcs/expression.cs
===================================================================
--- trunk/mcs/mcs/expression.cs 2007-11-07 10:27:26 UTC (rev 89084)
+++ trunk/mcs/mcs/expression.cs 2007-11-07 10:31:37 UTC (rev 89085)
@@ -1194,7 +1194,7 @@
                                        action = Action.LeaveOnStack;
 
                                Constant c = e as Constant;
-                               if (c != null && c.GetValue () == null) {
+                               if (c != null && c.Type != etype) {
                                        action = Action.AlwaysFalse;
                                        Report.Warning (184, 1, loc, "The given 
expression is never of the provided (`{0}') type",
                                                TypeManager.CSharpName 
(probe_type));

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

Reply via email to