2005-05-31 Sebastien Pouliot <sebastien@ximian.com>
[mono.git] / mcs / mcs / pending.cs
index 133da0d7dad38b701689ac6b225d2c3d7a51b69f..bef86ab0c64b05cdcd89d69a9e3df518fcd1e50e 100644 (file)
@@ -525,7 +525,16 @@ namespace Mono.CSharp {
                        if (list.Count == 0)
                                return false;
 
+                       if (TypeManager.ImplementsInterface (container.TypeBuilder.BaseType, iface_type))
+                               return true;
+
+                       //
+                       // FIXME: We should be creating fewer proxies.  The runtime can handle most cases.  
+                       //        At worst, if we can't avoid creating the proxy, we may need to make the 
+                       //        proxy use Callvirt.
+                       //
                        MethodInfo base_method = (MethodInfo) list [0];
+
                        if (!base_method.IsAbstract)
                                DefineProxy (iface_type, base_method, mi, args);
                        return true;