foreach (MissingInterfacesInfo missing in missing_ifaces){
MethodInfo [] mi;
Type t = missing.Type;
-
+
+ if (!t.IsInterface)
+ continue;
+
if (t is TypeBuilder){
- Interface iface;
+ TypeContainer iface;
iface = TypeManager.LookupInterface (t);
-
+
mi = iface.GetMethods ();
} else
mi = t.GetMethods ();
//
// Completely broken. So we do it ourselves!
//
- TypeExpr [] impl = TypeManager.GetExplicitInterfaces (type_builder);
+ Type [] impl = TypeManager.GetExplicitInterfaces (type_builder);
if (impl == null || impl.Length == 0)
return EmptyMissingInterfacesInfo;
MissingInterfacesInfo [] ret = new MissingInterfacesInfo [impl.Length];
for (int i = 0; i < impl.Length; i++)
- ret [i] = new MissingInterfacesInfo (impl [i].Type);
+ ret [i] = new MissingInterfacesInfo (impl [i]);
// we really should not get here because Object doesnt implement any
// interfaces. But it could implement something internal, so we have
if (type_builder.BaseType == null)
return ret;
- TypeExpr [] parent_impls = TypeManager.GetInterfaces (type_builder.BaseType);
+ Type [] parent_impls = TypeManager.GetInterfaces (type_builder.BaseType);
- foreach (TypeExpr te in parent_impls) {
- Type t = te.Type;
-
+ foreach (Type t in parent_impls) {
for (int i = 0; i < ret.Length; i ++) {
if (t == ret [i].Type) {
ret [i].Optional = true;
for (i = 0; i < top; i++){
Type type = pending_implementations [i].type;
int j = 0;
-
+
foreach (MethodInfo mi in pending_implementations [i].methods){
if (mi == null)
continue;
if (pending_implementations [i].found [j]) {
string[] methodLabel = TypeManager.CSharpSignature (mi).Split ('.');
- Report.Error (536, container.Location, "'{0}' does not implement interface member '{1}'. '{2}.{3}' is either static, not public, or has the wrong return type",
- container.Name, TypeManager.CSharpSignature (mi), container.Name, methodLabel[methodLabel.Length - 1]);
+ Report.Error (536, container.Location,
+ "'{0}' does not implement interface member '{1}'. '{2}.{3}' " +
+ "is either static, not public, or has the wrong return type",
+ container.Name, TypeManager.CSharpSignature (mi),
+ container.Name, methodLabel[methodLabel.Length - 1]);
}
else {
Report.Error (535, container.Location, "'{0}' does not implement interface member '{1}'",