** merged revision 57289 from mcs/
authorRaja R Harinath <harinath@hurrynot.org>
Thu, 23 Mar 2006 14:29:14 +0000 (14:29 -0000)
committerRaja R Harinath <harinath@hurrynot.org>
Thu, 23 Mar 2006 14:29:14 +0000 (14:29 -0000)
svn path=/trunk/mcs/; revision=58359

mcs/gmcs/ChangeLog
mcs/gmcs/delegate.cs

index b3313cec439977a8b29d2f67843e52a3e687b1c3..9a4b09edafcbedcfef75864d4ab801ca1c75f275 100644 (file)
@@ -1,4 +1,8 @@
-2006-03-23  Raja R Harinath  <rharinath@novell.com>
+2006-02-25  Marek Safar  <marek.safar@seznam.cz>
+
+       * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Don't report
+       error multiple times.
+
 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
 
        New partial class implementation.
@@ -48,6 +52,7 @@
        (RootTypes): Started to use this class more often for root types
        specializations.
 
+2006-03-23  Raja R Harinath  <rharinath@novell.com>
 
        * generic.cs (TypeParameter.UpdateConstraints): Update
        'constraints' if null.
index e3824cd60142d051748b9a1701987827fc1b89e3..77db0a961f435621ba4321ffb9db5daaf4c620d1 100644 (file)
@@ -762,12 +762,16 @@ namespace Mono.CSharp {
                        IMethodData md = TypeManager.GetMethod (delegate_method);
                        if (md == null) {
                                if (System.Attribute.GetCustomAttribute (delegate_method, TypeManager.conditional_attribute_type) != null) {
+                                       Report.SymbolRelatedToPreviousError (delegate_method);
                                        Report.Error (1618, loc, "Cannot create delegate with `{0}' because it has a Conditional attribute", TypeManager.CSharpSignature (delegate_method));
+                                       return null;
                                }
                        } else {
                                md.SetMemberIsUsed ();
                                if (md.OptAttributes != null && md.OptAttributes.Search (TypeManager.conditional_attribute_type) != null) {
+                                       Report.SymbolRelatedToPreviousError (delegate_method);
                                        Report.Error (1618, loc, "Cannot create delegate with `{0}' because it has a Conditional attribute", TypeManager.CSharpSignature (delegate_method));
+                                       return null;
                                }
                        }