I'm trying to write an interface for sending generic events to a remote server, along with a listener which returns a response that includes the list of events that was sent/attempted to be sent.
interface Sender<T> {
interface Response {
val success: Boolean
val events: List<T> // unresolved reference
}
...
}
If I change the T to a *, it compiles, but the type doesn't match what I need in the listener.
How can I "inherit" the generic type T in a sub-interface like this?