I have a question. Is there any there any other way to fix this code than adding @JvmName?
class Test() { fun <T> apply(calc: (String, List<Double>, Double, Double) -> T): T { return calc("a", listOf(), 1.2, 3.4) } fun <T> apply(calc: (String, Double, Double, Double) -> T): T { return calc("a", 1.2, 3.4, 5.6) } } The above code makes the following error:
Error:(375, 9) Kotlin: Platform declaration clash: The following declarations have the same JVM signature (apply(Lkotlin/jvm/functions/Function4;)Ljava/lang/Object;): fun <T> apply(calc: (String, Double, Double, Double) -> T): T defined in Sample.Test fun <T> apply(calc: (String, List<Double>, Double, Double) -> T): T defined in Sample.Test