Why is it that extension overloading methods like:...
# announcements
a
Why is it that extension overloading methods like:
Copy code
class TestOverloading

fun <T: Any> TestOverloading.perform(input: List<T>): T {
    throw IllegalStateException()
}

fun TestOverloading.perform(input: List<Int>): Int {
    return 1
}

fun TestOverloading.perform(input: List<String>): String {
    return "123"
}
Don't need the
@JvmName
? Because when these methods are defined on the class itself you will need it