Files
kotlin-fork/backend.native/tests/codegen/delegatedProperty/delegatedOverride_lib.kt
T
Pavel Punegov 35505007d2 TestRunner support in test's build.gradle
* Fixes to tests
 * RunKonanTest runs tests build with TestRunner
 * Standalone tests
2017-10-20 18:25:05 +03:00

23 lines
341 B
Kotlin

package a
import kotlin.reflect.KProperty
open class A {
open val x = 42
}
class Delegate {
val f = 117
operator fun getValue(receiver: Any?, p: KProperty<*>): Int {
println(p.name)
return f
}
}
open class B: A() {
override val x: Int by Delegate()
fun bar() {
println(super<A>.x)
}
}