This two functions conflicts with each other. Is there a workaround for this issue?
inline fun <reified T: Any> foo() = ...
inline fun <reified T: Any, reified I: Any> foo() = ...
Thanks!
Edit:
I found convenient(at least for me) solution for this issue:
inline fun <reified T: Any> foo() = foo<T, MyDefaultType>()
inline fun <reified T: Any, reified I: Any> foo(type1: KClass<T> = T::class, type2: KClass<I> = I::class) = ...
It can be even concise if you choose to add only one parameter.
Later you can use it like this:
val x = foo<A, B>()
val y = foo<C>()
That's what I need.