svn path=/branches/mono-1-1-9/mcs/; revision=50438
[mono.git] / mcs / bmcs / location.cs
index 4babbf721c682c913bc2c354100fe7d49e18bf02..0066b89256add2045e94b48d4da41ea0d4f60c96 100644 (file)
@@ -84,7 +84,12 @@ namespace Mono.CSharp {
                        string path = Path.GetFullPath (name);
 
                        if (source_files.Contains (path)){
-                               Report.Warning (2002, name, "Source file '{0}' specified multiple times", path);
+                               int id = (int) source_files [path];
+                               string other_name = ((SourceFile) source_list [id - 1]).Name;
+                               if (name.Equals (other_name))
+                                       Report.Warning (2002, "Source file '{0}' specified multiple times", name);
+                               else
+                                       Report.Warning (2002, "Source filenames '{0}' and '{1}' both refer to the same file: {2}", name, other_name, path);
                                return;
                        }