Files
kotlin-fork/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndLocalDelegatedProperty.kt
T

19 lines
313 B
Kotlin
Vendored

// CHECK_BYTECODE_LISTING
// FIR_IDENTICAL
enum class E { X }
object O {
val E.d: Delegate get() = Delegate()
}
class Delegate {
operator fun getValue(thisRef: Any?, property: Any?) =
if (thisRef == null) "OK" else "Failed"
}
fun box(): String = with(O) {
val result by E.X.d
result
}