[Mono-bugs] [Bug 61223][Maj] Changed - [PATCH] System.Type.GetInterfaces does not report inherited interfaces

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 8 Jul 2004 13:29:07 -0400 (EDT)

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by grompf@sublimeintervention.com.


--- shadow/61223	2004-07-08 05:11:31.000000000 -0400
+++ shadow/61223.tmp.12077	2004-07-08 13:29:07.000000000 -0400
@@ -110,6 +110,28 @@
 is the array of interfaces implemented directly by the type.
 I think the correct fix would be to change GetInterfaces () to
 loop over the interfaces array and accumulate the interfaces
 implemented by those types in an arraylist. It may needed to also loop
 over the the parent hierarchy, but a more complete test is needed to
 check for this.
+------- Additional Comments From grompf@sublimeintervention.com  2004-07-08 13:29 -------
+Investigated further into this today as per our discussions Paolo;
+If you look at the attached testcase; its actually been passed from TypeBuilder; created and 
+casted to a Type; so patching this in Type.GetInterfaces wont work; as thats back into the 
+icall land.  I think the correct behaviour might actually be to flatten at add time.
+Further, in terms of duplicates; it seems MS discards them after the first match; take the 
+following case
+interface Frank : Bob {}
+interface Sally : Bob{}
+class Billy : Frank, Sally {}
+Building that in a type builder and looping over GetInterfaces() you will get (in order):