Allen Eubank02/04/2021, 5:28 PM
. Is there a way to keep `sendMessage/receiveMessage`` in the abstract class? Or do I have to move it into the concrete implementation?
Cannot use 'T' as reified type parameter. Use a class instead.
Ivan Pavlov02/04/2021, 8:37 PM
function is a reified one but you can't pass erased T there. Probably there is overload for this function which accepts KClass parameter. So the solution here is to store reference to a KClass instance in constructor (
) and pass concrete classes in inheritors. After that you can pass it to
private val clazz: KClass<T>
if there is such overload
Allen Eubank02/04/2021, 9:43 PM