Can Kotlin implement the same interface (with diff...
# getting-started
b
Can Kotlin implement the same interface (with different generic types) multiple times? After some experiments, I guess not. If that's true, how can I work around it?
k
No, because at runtime there's no difference between
Consumer<String>
and
Consumer<Int>
, so the methods would collide.
b
What's the most professional way to work around this?
k
The answers on the question you linked all apply to Kotlin as well.