package foo import kotlin.reflect.KProperty open class A { val B.w: Int by MyProperty() } val B.r: Int by MyProperty() val A.e: Int by MyProperty() class B { val A.f: Int by MyProperty() } class MyProperty { operator fun getValue(thisRef: R, desc: KProperty<*>): T { throw Exception("$thisRef $desc") } }