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,27 @@
FILE: delegateWithArgInference.kt
public final class Delegate<T> : R|kotlin/Any| {
public constructor<T>(data: R|T|): R|Delegate<T>| {
super<R|kotlin/Any|>()
}
public final val data: R|T| = R|<local>/data|
public get(): R|T|
public final operator fun getValue(thisRef: R|kotlin/Nothing?|, prop: R|kotlin/reflect/KProperty<*>|): R|T| {
^getValue this@R|/Delegate|.R|/Delegate.data|
}
}
public final fun makeIntDelegate(t: R|kotlin/Int|): R|Delegate<kotlin/Int>| {
^makeIntDelegate R|/Delegate.Delegate|<R|kotlin/Int|>(R|<local>/t|)
}
public final fun <M> materialize(): R|M| {
^materialize Null(null)!!
}
public final fun <Q> id(v: R|Q|): R|Q| {
^id R|<local>/v|
}
public final val x: R|kotlin/Int|by R|/makeIntDelegate|(R|/id|<R|kotlin/Int|>(R|/materialize|<R|kotlin/Int|>()))
public get(): R|kotlin/Int| {
^ D|/x|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/Int|>|(Null(null), ::R|/x|)
}