Author: marek
Date: 2007-09-05 05:19:08 -0400 (Wed, 05 Sep 2007)
New Revision: 85337

Modified:
   trunk/mcs/mcs/ChangeLog
   trunk/mcs/mcs/convert.cs
Log:
2007-09-05  Marek Safar  <[EMAIL PROTECTED]>

        A fix for bug #82676
        * convert.cs (ImplicitReferenceConversionCore): From any class-type S to
        any interface-type T means to any of interface type T.
        


Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog     2007-09-05 08:57:02 UTC (rev 85336)
+++ trunk/mcs/mcs/ChangeLog     2007-09-05 09:19:08 UTC (rev 85337)
@@ -1,3 +1,9 @@
+2007-09-05  Marek Safar  <[EMAIL PROTECTED]>
+
+       A fix for bug #82676
+       * convert.cs (ImplicitReferenceConversionCore): From any class-type S to
+       any interface-type T means to any of interface type T.
+
 2007-09-04  Marek Safar  <[EMAIL PROTECTED]>
 
        * namespace.cs: We have 2 versions of System.Core assembly.

Modified: trunk/mcs/mcs/convert.cs
===================================================================
--- trunk/mcs/mcs/convert.cs    2007-09-05 08:57:02 UTC (rev 85336)
+++ trunk/mcs/mcs/convert.cs    2007-09-05 09:19:08 UTC (rev 85337)
@@ -349,6 +349,13 @@
                                        return !TypeManager.IsGenericParameter 
(expr_type) &&
                                                !TypeManager.IsValueType 
(expr_type);
                                }
+                               
+                               if (!TypeManager.IsGenericType (target_type)) {
+                                       foreach (Type iface in 
TypeManager.GetInterfaces (target_type)) {
+                                               if 
(TypeManager.ImplementsInterface (expr_type, iface))
+                                                       return true;
+                                       }
+                               }
                        }
 
                        // from any interface type S to interface-type T.

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

Reply via email to