Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/delegates/receiverInference.kt
T
2021-12-15 22:22:57 +03:00

17 lines
356 B
Kotlin
Vendored

import kotlin.reflect.KProperty
interface XEntity
class Provider<out R> {
operator fun provideDelegate(thisRef: XEntity, prop: Any): R = null!!
}
class Prop<E, V> {
operator fun getValue(receiver: E, prop: Any): V = null!!
}
fun <R: XEntity, V> mkProp(): Provider<Prop<R, V>> = Provider()
class MyEnt: XEntity {
val d: String by mkProp()
}