[Mono-bugs] [Bug 352536] New: mcs allows abstract events to be used in ways that seem incorrect

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jan 8 19:34:38 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=352536


           Summary: mcs allows abstract events to be used in ways that seem
                    incorrect
           Product: Mono: Compilers
           Version: 1.2.4
          Platform: i686
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: bratsche at gnome.org
         QAContact: mono-bugs at ximian.com
          Found By: ---


Created an attachment (id=189834)
 --> (https://bugzilla.novell.com/attachment.cgi?id=189834)
Brief test program to demonstrate the bug

mcs allows you to to have an abstract event and use it in ways that don't seem
correct, and in ways that csc does not allow you to do.

For example, the attached file compiles fine using mcs 1.2.4 but when I try to
compile with csc from VS2003 or VS2005 I get the following error:

test.cs(14,9): error CS0079: The event 'Foo.BaseFoo.Changed' can only appear on
the left hand side of += or -=
test.cs(15,6): error CS0079: The event 'Foo.BaseFoo.Changed' can only appear on
the left hand side of += or -=


I ran into some code at work the other day that was using abstract in this way,
and it wouldn't build in Visual Studio.  The solution was to change 'abstract'
to 'virtual'.  But I figured I'd file a bug report with mcs because at the
least it might help improve compatibility.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list