- Fixed baseline aligning calcs
[mono.git] / mcs / mcs / pending.cs
old mode 100755 (executable)
new mode 100644 (file)
index fb7a98f..eebb411
@@ -148,12 +148,15 @@ namespace Mono.CSharp {
                        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 ();
@@ -229,7 +232,7 @@ namespace Mono.CSharp {
                        //
                        // 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;
@@ -237,7 +240,7 @@ namespace Mono.CSharp {
                        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
@@ -245,11 +248,9 @@ namespace Mono.CSharp {
                        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;
@@ -524,7 +525,7 @@ namespace Mono.CSharp {
                        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;
@@ -547,8 +548,11 @@ namespace Mono.CSharp {
                                                
                                                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}'",