Let’s say I have this code: ```interface ApiMessag...
# announcements
s
Let’s say I have this code:
Copy code
interface ApiMessage<T : ApiMessage<T>> {
  fun convertToBytes(): ByteArray
}

data class GetAllMessagesRequest(): ApiMessage<GetAllMessagesRequest> {
}
And later in my code I want to do something like:
Copy code
fun performRequest(request: ApiMessage)
But the compiler complain about
One type argument expected for T
How could I achieve something like this and received a generic instance of my interface? I can’t really easily change my
ApiMessage
interface and request message. Thanks!