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.
svn path=/trunk/mcs/; revision=85337
+2007-09-05 Marek Safar <marek.safar@gmail.com>
+
+ 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 <marek.safar@gmail.com>
* namespace.cs: We have 2 versions of System.Core assembly.
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.