Report full type name for missing type references
authorMarek Safar <marek.safar@gmail.com>
Wed, 12 Jan 2011 10:23:44 +0000 (10:23 +0000)
committerMarek Safar <marek.safar@gmail.com>
Wed, 12 Jan 2011 15:32:00 +0000 (15:32 +0000)
mcs/mcs/import.cs
mcs/mcs/reflection.cs

index be9c62eb37e6776c537b4a6cdafe387819bab835..84276a65ede0f410f1ced5b4aa12286a04e35784 100644 (file)
@@ -1697,15 +1697,19 @@ namespace Mono.CSharp
                public static void Error_MissingDependency (IMemberContext ctx, List<MissingType> types, Location loc)
                {
                        foreach (var t in types) {
+                               string name = t.Name;
+                               if (t.Namespace != null)
+                                       name = t.Namespace + "." + name;
+
                                if (t.Module.Assembly.GetName ().Name == ctx.Module.DeclaringAssembly.Name) {
                                        ctx.Compiler.Report.Warning (1683, 1, loc,
                                                "Reference to type `{0}' claims it is defined in this assembly, but it is not defined in source or any added modules",
-                                               t.Name);
+                                               name);
                                }
 
                                ctx.Compiler.Report.Error (12, loc,
                                        "The type `{0}' is defined in an assembly that is not referenced. Consider adding a reference to assembly `{1}'",
-                                       t.Name, t.Module.Assembly.FullName);
+                                       name, t.Module.Assembly.FullName);
                        }
                }
 
index 266c56d215ecc9d730ee937aa8652c12f0159cec..a34b9d75cb114f7058acffda77e692da1d502eda 100644 (file)
@@ -176,6 +176,12 @@ namespace Mono.CSharp
                                throw new NotSupportedException ();
                        }
                }
+
+               public string Namespace {
+                       get {
+                               throw new NotSupportedException ();
+                       }
+               }
        }
 
 #endif