**** Merged from MCS ****
[mono.git] / mcs / gmcs / tree.cs
index 7165db2cd08db08151d7b6f7afbbabaac222ee35..0267f451d94ab24e91fff3a28be510f8f824d250 100755 (executable)
@@ -56,11 +56,12 @@ namespace Mono.CSharp
                public void RecordDecl (string name, DeclSpace ds)
                {
                        if (decls.Contains (name)){
+                               DeclSpace other = (DeclSpace) decls [name];
+                               Report.SymbolRelatedToPreviousError (other.Location, other.GetSignatureForError ());
+
                                Report.Error (
                                        101, ds.Location,
                                        "There is already a definition for `" + name + "'");
-                               DeclSpace other = (DeclSpace) decls [name];
-                               Report.LocationOfPreviousError (other.Location);
                                return;
                        }