Build declared interface based on full type hierarchy
authorMarek Safar <marek.safar@gmail.com>
Tue, 18 Jan 2011 17:34:04 +0000 (17:34 +0000)
committerMarek Safar <marek.safar@gmail.com>
Tue, 18 Jan 2011 17:34:56 +0000 (17:34 +0000)
mcs/mcs/import.cs

index 1533c8dd866e027ecac2ce9a6afebbd4e5b7c4da..f459f7fb51e32e15dad69eb51a7e08d35feba8a7 100644 (file)
@@ -938,10 +938,12 @@ namespace Mono.CSharp
 
                        MetaType[] ifaces;
 #if STATIC
-                       ifaces = type.__GetDeclaredInterfaces ();
-                       while (ifaces.Length != 0) {
-                               foreach (var iface in ifaces)
-                                       spec.AddInterface (CreateType (iface));
+                       while (true) {
+                               ifaces = type.__GetDeclaredInterfaces ();
+                               if (ifaces.Length != 0) {
+                                       foreach (var iface in ifaces)
+                                               spec.AddInterface (CreateType (iface));
+                               }
 
                                type = type.BaseType;
                                if (type == null || type.__ContainsMissingType)