[Mono-bugs] [Bug 52497][Wis] New - We do not report CS0079 correctly

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 23 Dec 2003 13:56:55 -0500 (EST)


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 bmaurer@users.sf.net.

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

--- shadow/52497	2003-12-23 13:56:55.000000000 -0500
+++ shadow/52497.tmp.4179	2003-12-23 13:56:55.000000000 -0500
@@ -0,0 +1,46 @@
+Bug#: 52497
+Product: Mono/Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: We do not report CS0079 correctly
+
+using System;
+
+public delegate void Blah ();
+public class T {
+   public event Blah Foo {
+      add {
+      }
+      remove {
+      }
+   }
+
+   public void Fire()
+   {
+      Foo ();
+   }
+
+   public static void Main()
+   {
+   }
+}
+
+CSC gives
+t.cs(14,7): error CS0079: The event 'T.Foo' can only appear on the left 
+hand side of += or -=
+
+We give
+t.cs(14) error CS0070: The event `Foo' can only appear on the left hand 
+side += or -= (except on the defining type)