//
// Author:
// Miguel de Icaza (miguel@gnu.org)
+// Anirban Bhattacharjee (banirban@novell.com)
//
// Licensed under the terms of the GNU GPL
//
// If a method is defined here, then we always need to
// create a proxy for it. This is used when implementing
- // an interface's indexer with a different IndexerName.
+ // an interface's indexer with a different DefaultPropName.
public MethodInfo [] need_proxy;
}
if (ifaces != null){
foreach (Type t in ifaces){
MethodInfo [] mi;
-
- if (t is TypeBuilder){
+ /*if (t is TypeBuilder){
Interface iface;
iface = TypeManager.LookupInterface (t);
mi = iface.GetMethods (container);
- } else
- mi = t.GetMethods ();
+ } else*/
+ mi = t.GetMethods ();
int count = mi.Length;
pending_implementations [i].type = t;
abstract_methods.CopyTo (pending_implementations [i].methods, 0);
pending_implementations [i].found = new bool [count];
pending_implementations [i].args = new Type [count][];
- pending_implementations [i].type = type_builder;
+ pending_implementations [i].type = type_builder.BaseType;
int j = 0;
foreach (MemberInfo m in abstract_methods){
MethodInfo mi = (MethodInfo) m;
-
+
Type [] types = TypeManager.GetArgumentTypes (mi);
pending_implementations [i].args [j] = types;
}
}
#endif
-
- icount = ifaces.Length;
+
+ ifaces = TypeManager.ExpandInterfaces (ifaces);
+ icount = ifaces.Length;
//
// If we are implementing an abstract class, and we are not
// ourselves abstract, and there are abstract methods (C# allows
/// <summary>
/// Whether the specified method is an interface method implementation
/// </summary>
- public MethodInfo IsInterfaceMethod (Type t, string name, Type ret_type, Type [] args)
+ public MethodInfo IsAbstractMethod (Type t, string name, Type ret_type, Type [] args)
{
return InterfaceMethod (t, name, ret_type, args, Operation.Lookup, null);
}
- public MethodInfo IsInterfaceIndexer (Type t, Type ret_type, Type [] args)
+ public MethodInfo IsAbstractIndexer (Type t, Type ret_type, Type [] args)
{
return InterfaceMethod (t, null, ret_type, args, Operation.Lookup, null);
}
/// all the methods with the given signature.
///
/// The `MethodInfo need_proxy' is used when we're implementing an interface's
- /// indexer in a class. If the new indexer's IndexerName does not match the one
+ /// indexer in a class. If the new indexer's DefaultPropName does not match the one
/// that was used in the interface, then we always need to create a proxy for it.
///
/// </remarks>
// implementation and we can always clear the method.
// `need_proxy' is not null if we're implementing an
// interface indexer. In this case, we need to create
- // a proxy if the implementation's IndexerName doesn't
- // match the IndexerName in the interface.
+ // a proxy if the implementation's DefaultPropName doesn't
+ // match the DefaultPropName in the interface.
if ((t == null) && (need_proxy != null) && (name != m.Name))
tm.need_proxy [i] = need_proxy;
else