JVM_IR: support type parameters in @JvmOverload functions

This commit is contained in:
Georgy Bronnikov
2019-09-23 20:24:36 +03:00
parent 7467c80970
commit e38ff8753e
5 changed files with 42 additions and 0 deletions
@@ -0,0 +1,23 @@
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: box.kt
class C {
@kotlin.jvm.JvmOverloads public fun <X> foo(x: X, s: String = "OK"): String {
return s
}
}
fun box(): String {
return A().test()
}
// FILE: A.java
public class A {
public String test() {
return new C().foo(42);
}
}