As can be seen from this line:
|
public fun <C : Any> Command.Builder<C>.senderType(type: KClass<out C>): Command.Builder<C> = |
The type is not being narrowed, even though the Java version of the method for both
Class and
TypeToken overloads does narrow it down. This could be fixed in the following way:
public fun <C : Any, N : C> Command.Builder<C>.senderType(type: KClass<out N>): Command.Builder<N> =
senderType(type.java)