Update
[mono.git] / mcs / mcs / location.cs
index 359102d5e7016b0f5088df52f9cd08a71fa1f108..d580aee2b105f7b7f50d27c5b4ebca7fea60d39f 100644 (file)
@@ -57,7 +57,7 @@ namespace Mono.CSharp {
        ///   in 8 bits (and say, map anything after char 255 to be `255+').
        /// </remarks>
        public struct Location {
-               public int token; 
+               int token; 
 
                static ArrayList source_list;
                static Hashtable source_files;
@@ -84,7 +84,12 @@ namespace Mono.CSharp {
                        string path = Path.GetFullPath (name);
 
                        if (source_files.Contains (path)){
-                               Report.Warning (Message.CS2002_Source_file_specified_multiple_times, name);
+                               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;
                        }