History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: BOO-817
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Cedric Vivier
Reporter: George Dernovoy
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Boo

issue an error "event can only be invoked from within the class that declared it"

Created: 14/Apr/07 05:02 PM   Updated: 07/Feb/08 07:04 AM
Component/s: Compiler
Affects Version/s: 0.7.7
Fix Version/s: 0.8.1

Time Tracking:
Not Specified

Testcase included: yes


 Description  « Hide
discussion: http://groups.google.com/group/boolang/browse_thread/thread/a553505834526d03

import System
AppDomain().ProcessExit()

should issue an error "event can only be invoked from within the class that declared it"
instead of an internal compiler error.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Cedric Vivier - 06/Feb/08 04:38 AM
It's almost done but I've noticed something I'm not sure what to do (or not do) with it :

Currently we allow invoking base class events from derived classes.
In our documentation we don't really say it is the case (or very implied) :

"It can't be called from outside its parent class."

C# is clearer about this :

"Derived classes cannot directly invoke events that are declared within the base class."

Should we fix the documentation or only allow invoking events from the declaring class ?


Cedric Vivier - 07/Feb/08 07:04 AM
fixed in rev. 2854

boo now only allows raising an event from its declaring class. documentation changed to clearer description.