[Mono-bugs] [Bug 333334] event addition is done incoorectly in some cases

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Oct 12 08:07:07 EDT 2007


https://bugzilla.novell.com/show_bug.cgi?id=333334#c1





--- Comment #1 from Marek Safar <msafar at novell.com>  2007-10-12 06:07:06 MST ---
It looks like we behave exactly as csc, which however does not comply with C#
standard which says:

Event access
E += value
The add accessor of the event E in the containing class or struct is invoked.
If E is not static, the instance expression is this.
E -= value
The remove accessor of the event E in the containing class or struct is
invoked. If E is not static, the instance expression is this.
T.E += value
The add accessor of the event E in the class or struct T is invoked. A
compile-time error occurs if E is not static.
T.E -= value
The remove accessor of the event E in the class or struct T is invoked. A
compile-time error occurs if E is not static.
e.E += value
The add accessor of the event E in the class, struct, or interface given by the
type of e is invoked with the instance expression e. A compile-time error
occurs if E is static.
e.E -= value
The remove accessor of the event E in the class, struct, or interface given by
the type of e is invoked with the instance expression e. A compile-time error
occurs if E is static.


The bug happens only for local non-customized accessors, where we bind to
private event field and not to event itself.


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


More information about the mono-bugs mailing list