[Mono-bugs] [Bug 48710][Nor] New - MCS 0.26 error CS0070 incorrect
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 22 Sep 2003 13:40:22 -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 2ligkjk02@sneakemail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=48710
--- shadow/48710 2003-09-22 13:40:21.000000000 -0400
+++ shadow/48710.tmp.29273 2003-09-22 13:40:21.000000000 -0400
@@ -0,0 +1,74 @@
+Bug#: 48710
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details: XP
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: 2ligkjk02@sneakemail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: MCS 0.26 error CS0070 incorrect
+
+Description of Problem:
+MCS 0.26.42336.0 gives error CS0070 while neither version of CSC does.
+
+Steps to reproduce the problem:
+1. Create file nest.cs with contents at end of this report
+2. execute mcs nest.cs
+
+Actual Results:
+c:\mono\test\nest.cs(13) error CS0070: The event 'OnWhatever' can only
+appear on
+ the left-side of a += or -= (except when used from within the type 'cls')
+Compilation failed: 1 error(s), 0 warnings
+
+Expected Results:
+Clean compile.
+
+How often does this happen?
+Consistently
+
+Additional Information:
+nest.cs file contents:
+
+using System;
+
+public delegate void OnWhateverDelegate( string s );
+
+class cls
+{
+ public event OnWhateverDelegate OnWhatever;
+
+ class nestedcls
+ {
+ internal void CallParentDel( cls c, string s )
+ {
+ c.OnWhatever( s );
+ }
+ }
+ internal void CallMyDel( string s)
+ {
+ (new nestedcls()).CallParentDel( this, s );
+ }
+}
+
+class MonoEmbed
+{
+ static void Main()
+ {
+ cls c = new cls();
+ c.OnWhatever += new OnWhateverDelegate( Whatever );
+ c.CallMyDel( "test" );
+ }
+ static void Whatever( string s )
+ {
+ Console.WriteLine( s );
+ }
+}