[Mono-bugs] [Bug 65459][Nor] New - Type lookup ignores delegates defined in the current class.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 7 Sep 2004 11:23:27 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by miguel@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=65459

--- shadow/65459	2004-09-07 11:23:27.000000000 -0400
+++ shadow/65459.tmp.31317	2004-09-07 11:23:27.000000000 -0400
@@ -0,0 +1,48 @@
+Bug#: 65459
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: miguel@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Type lookup ignores delegates defined in the current class.
+
+The following makes GmailProvider fail:
+
+http://johnvey.com/features/gmailapi/GmailAgent051-src.zip
+
+using System;
+
+        class X {
+                public delegate void EventHandler (object a);
+                public event EventHandler A;
+        }
+
+        class Y {
+                void Do (X x)
+                {
+                        x.A += new X.EventHandler (a);
+                }
+
+                void a (object s)
+                {
+                }
+
+                static void Main ()
+                {
+                }
+        }
+
+The error produced by mcs is:
+
+a.cs(11) error CS0019: Operator + cannot be applied to operands of type
+`System.EventHandler' and `X+EventHandler'