Files
kotlin-fork/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.kt.txt
T
2024-02-16 10:19:38 +00:00

41 lines
794 B
Kotlin
Vendored

val testTopLevel: String /* by */
field = DelegateProvider(value = "OK").provideDelegate(thisRef = null, property = ::testTopLevel)
get(): String {
return #testTopLevel$delegate.getValue(thisRef = null, property = ::testTopLevel)
}
class Delegate {
val value: String
field = value
get
constructor(value: String) /* primary */ {
super/*Any*/()
/* <init>() */
}
operator fun getValue(thisRef: Any?, property: Any?): String {
return <this>.<get-value>()
}
}
class DelegateProvider {
val value: String
field = value
get
constructor(value: String) /* primary */ {
super/*Any*/()
/* <init>() */
}
operator fun provideDelegate(thisRef: Any?, property: Any?): Delegate {
return Delegate(value = <this>.<get-value>())
}
}