Author: marek
Date: 2007-10-05 10:54:37 -0400 (Fri, 05 Oct 2007)
New Revision: 86988
Modified:
trunk/mcs/gmcs/ChangeLog
trunk/mcs/gmcs/generic.cs
Log:
2007-10-05 Marek Safar <[EMAIL PROTECTED]>
A fix for bug #327497
* generics.cs (Constraints.CheckInterfaceMethod): Compare geenric open
types when appropriate.
Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog 2007-10-05 14:46:31 UTC (rev 86987)
+++ trunk/mcs/gmcs/ChangeLog 2007-10-05 14:54:37 UTC (rev 86988)
@@ -1,3 +1,9 @@
+2007-10-05 Marek Safar <[EMAIL PROTECTED]>
+
+ A fix for bug #327497
+ * generics.cs (Constraints.CheckInterfaceMethod): Compare geenric open
+ types when appropriate.
+
2007-10-02 Marek Safar <[EMAIL PROTECTED]>
A fix for bug #329685
Modified: trunk/mcs/gmcs/generic.cs
===================================================================
--- trunk/mcs/gmcs/generic.cs 2007-10-05 14:46:31 UTC (rev 86987)
+++ trunk/mcs/gmcs/generic.cs 2007-10-05 14:54:37 UTC (rev 86988)
@@ -553,9 +553,17 @@
if (gc_icount != icount)
return false;
- foreach (Type iface in gc.InterfaceConstraints) {
+ for (int i = 0; i < gc.InterfaceConstraints.Length;
++i) {
+ Type iface = gc.InterfaceConstraints [i];
+ if (iface.IsGenericType)
+ iface = iface.GetGenericTypeDefinition
();
+
bool ok = false;
- foreach (Type check in InterfaceConstraints) {
+ for (int ii = 0; i <
InterfaceConstraints.Length; ++ii) {
+ Type check = InterfaceConstraints [ii];
+ if (check.IsGenericType)
+ check =
check.GetGenericTypeDefinition ();
+
if (TypeManager.IsEqual (iface, check))
{
ok = true;
break;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches