Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Posting instance of subclass calls subscribers of its superclass #83
Here is a "test case": https://gist.github.com/venator85/5487144
Is this intended behaviour? While the producing behaviour is consistent with the sentence "Registering will only find methods on the immediate class type." on the web site, my understanding was that it would still hold for subscribers.
This is purely a discovery contract.
On the other hand, a posted event object's class hierarchy is walked and subscribers for any of its types will be invoked. The event hierarchy is much more important than the registration hierarchy. For example, while I may be interested in
Do you still have plans to remove this restriction? I'm assuming not as that could be disruptive (e.g. if somebody has accidentally
If you are going to keep the restriction, then it would be great if Otto gave a compilation warning for using
FYI, two common situations where I've done this are:
I just hit the second case now - I've been used to using EventBus instead of Otto, so I hit this limitation without expecting it.
No one is working on Otto, and I doubt it'll see many more releases, if
On Mon, Jul 20, 2015 at 4:05 PM Dan J firstname.lastname@example.org wrote: