* outline.cs: filter out interfaces in generic constraint clauses
authorBen Maurer <benm@mono-cvs.ximian.com>
Mon, 4 Jul 2005 18:56:24 +0000 (18:56 -0000)
committerBen Maurer <benm@mono-cvs.ximian.com>
Mon, 4 Jul 2005 18:56:24 +0000 (18:56 -0000)
that come from the base class.

2005-07-04  Ben Maurer  <bmaurer@ximian.com>

svn path=/trunk/mcs/; revision=46914

mcs/tools/monop/ChangeLog
mcs/tools/monop/outline.cs

index c1e84c63116613dd5d2e6dafb379b8b57211282a..c15f54867c9b6e1f1b66bc4648d56cdf26052502 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-04  Ben Maurer  <bmaurer@ximian.com>
+
+       * outline.cs: filter out interfaces in generic constraint clauses
+       that come from the base class.
+
 2005-07-04  Ben Maurer  <bmaurer@ximian.com>
 
        * outline.cs: use tabs, not spaces, for indentation.
index 3142883c337cf77716730bff5304e7576e7f50d6..d35c93463cbbba93233d5cfb65f6327971d8ce89 100644 (file)
@@ -640,6 +640,8 @@ public class Outline {
                foreach (Type t in args) {
                        bool first = true;
                        Type[] ifaces = t.GetInterfaces();
+                       ifaces = Array.FindAll<Type> (ifaces, delegate (Type iface) { return !iface.IsAssignableFrom (t.BaseType); });
+                       
                        GenericParameterAttributes attrs = t.GenericParameterAttributes & GenericParameterAttributes.SpecialConstraintMask;
                        GenericParameterAttributes [] interesting = {
                                GenericParameterAttributes.ReferenceTypeConstraint,
@@ -648,13 +650,11 @@ public class Outline {
                        };
                        
                        if (t.BaseType != typeof (object) || ifaces.Length != 0 || attrs != 0) {
-                   
                                o.Write (" where ");
                                o.Write (FormatType (t));
                                o.Write (" : ");
                        }
 
-
                        if (t.BaseType != typeof (object)) {
                                o.Write (FormatType (t.BaseType));
                                first = false;