Files
kotlin-fork/compiler/testData/codegen/box/jvmName/fakeOverrideOfProperty.kt
T
2021-12-09 13:26:38 +03:00

24 lines
467 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// WITH_STDLIB
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
}
}