2008-11-05 Francisco Figueiredo Jr. <francisco@npgsql.org>
[mono.git] / mcs / mcs / report.cs
index eccac984f862a52031ff3a168299faf48678870f..8122aa13dfb75603ceb91e5c4abbe3815455dcd0 100644 (file)
@@ -671,8 +671,10 @@ namespace Mono.CSharp {
                                        return;
                                }
 
+                               // FIXME: Completely wrong, it has to use FindMembers
                                MemberCore mc = temp_ds.GetDefinition (mi.Name);
-                               SymbolRelatedToPreviousError (mc);
+                               if (mc != null)
+                                       SymbolRelatedToPreviousError (mc);
                        }
                }
 
@@ -708,7 +710,11 @@ namespace Mono.CSharp {
 
                static void SymbolRelatedToPreviousError (string loc, string symbol)
                {
-                       extra_information.Add (String.Format ("{0} (Location of the symbol related to previous ", loc));
+                       string msg = String.Format ("{0} (Location of the symbol related to previous ", loc);
+                       if (extra_information.Contains (msg))
+                               return;
+
+                       extra_information.Add (msg);
                }
 
                public static void ExtraInformation (Location loc, string msg)