Error: Conflicting overloads

I am getting following Compile time error

Conflicting overloads: public abstract fun Send(message: TMessage): Unit defined in com.test.Msg.MsgInterface, public abstract fun <TMessage, TTarget> Send(message: TMessage): Unit defined in com.test.msg.MsgInterface

Source code is as follows

interface MsgInterface


fun<T> Send(message:M )

fun<M, T> Send(message:M )


why i am getting this error? How can i solve this?

The compiler must based on the function-name and argument-types choose the correct function.

Based on the name “Unmount” and type Any, he can call both functions. Therefor he can never choose.