FIR2IR: Fix case of @JvmOverloads with subclass

Avoid generating synthetic overrides in subclass
It has been already working for PSI2IR because fake overrides there don't
inherit default values for parameters, while they do it in FIR
This commit is contained in:
Denis.Zharkov
2021-02-18 19:18:09 +03:00
parent 377a0aa237
commit e4c851e3ce
7 changed files with 46 additions and 6 deletions
+15
View File
@@ -0,0 +1,15 @@
// TARGET_BACKEND: JVM
// WITH_RUNTIME
open class A {
@JvmOverloads
fun foo(x: String, y: String = "", z: String = "K"): String {
return x + y + z
}
}
class B : A()
fun box(): String {
return B().foo("O")
}