FIR: Add more tests for delegate inference

This commit is contained in:
Simon Ogorodnik
2021-11-14 16:19:06 +03:00
committed by teamcity
parent bb411cbba7
commit 2e69f7732c
8 changed files with 143 additions and 0 deletions
@@ -0,0 +1,17 @@
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()
}