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,37 @@
FILE: receiverInference.kt
public abstract interface XEntity : R|kotlin/Any| {
}
public final class Provider<out R> : R|kotlin/Any| {
public constructor<out R>(): R|Provider<R>| {
super<R|kotlin/Any|>()
}
public final operator fun provideDelegate(thisRef: R|XEntity|, prop: R|kotlin/Any|): R|R| {
^provideDelegate Null(null)!!
}
}
public final class Prop<E, V> : R|kotlin/Any| {
public constructor<E, V>(): R|Prop<E, V>| {
super<R|kotlin/Any|>()
}
public final operator fun getValue(receiver: R|E|, prop: R|kotlin/Any|): R|V| {
^getValue Null(null)!!
}
}
public final fun <R : R|XEntity|, V> mkProp(): R|Provider<Prop<R, V>>| {
^mkProp R|/Provider.Provider|<R|Prop<R, V>|>()
}
public final class MyEnt : R|XEntity| {
public constructor(): R|MyEnt| {
super<R|kotlin/Any|>()
}
public final val d: R|kotlin/String|by R|/mkProp|<R|MyEnt|, R|kotlin/String|>().R|SubstitutionOverride</Provider.provideDelegate: R|Prop<Stub (builder inference): TypeVariable(_R), Stub (builder inference): TypeVariable(_V)>|>|(this@R|/MyEnt|, ::R|/MyEnt.d|)
public get(): R|kotlin/String| {
^ this@R|/MyEnt|.D|/MyEnt.d|.R|SubstitutionOverride</Prop.getValue: R|Stub (builder inference): TypeVariable(_V)|>|(this@R|/MyEnt|, ::R|/MyEnt.d|)
}
}