-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Listener type needs to be parameterized in service object type #615
Comments
In order to write the type for Listener in lang.object, we need a way to express that an object type has a type parameter, e.g. by extending |
It's not going to work to use The reason we need |
I chatted with @hasithaa and our conclusion was that the easiest solution was to make Listener like Iterator i.e.
|
Functions to register and deregister a listener. Fixes #361.
In order to make #611 useable, the Listener abstract object type needs to become a parameterized type
Listener<S>
, where S is the service object type.If some listener, e.g. FooListener defines an attach method whose first argument is a FooService, which defines some remote methods, then FooListener will not be a subtype of Listener as currently defined (because of parameter type contravariance). Instead it will be a subtype of
Listener<FooService>
.The text was updated successfully, but these errors were encountered: