FIR: Fix wrong ACCIDENTAL_OVERRIDE on fake override property with JvmName

This commit is contained in:
Denis.Zharkov
2021-11-10 18:15:22 +03:00
committed by teamcityserver
parent 6f55d23bab
commit a7859e0332
7 changed files with 69 additions and 10 deletions
@@ -0,0 +1,23 @@
// TARGET_BACKEND: JVM
// WITH_RUNTIME
abstract class Base {
protected abstract fun getChart(context: CharSequence): String
@get:JvmName("getChartHelper")
public val CharSequence.chart get() = getChart(this)
}
abstract class Derived1 : Base()
class Derived2 : Derived1() {
override fun getChart(context: CharSequence): String {
return context.toString()
}
}
fun box(): String {
return with(Derived2()) {
"OK".chart
}
}