FIR: Update test-data (Delegate inference)

This commit is contained in:
Mikhail Glukhikh
2021-11-15 11:30:57 +03:00
committed by teamcity
parent b45b624945
commit 40a2837b4c
27 changed files with 65 additions and 169 deletions
@@ -42,7 +42,7 @@ FILE: delegateInference.kt
public final var x: R|kotlin/Boolean|by R|/FreezableVar.FreezableVar|<R|kotlin/Boolean|>(Boolean(true))
public get(): R|kotlin/Boolean| {
^ this@R|/Test|.D|/Test.x|.R|SubstitutionOverride</FreezableVar.getValue: R|kotlin/Boolean|>|(this@R|/Test|, ::R|/Test.x|)
^ this@R|/Test|.D|/Test.x|.R|SubstitutionOverride</FreezableVar.getValue: R|Stub (builder inference): TypeVariable(_T)|>|(this@R|/Test|, ::R|/Test.x|)
}
public set(<set-?>: R|kotlin/Boolean|): R|kotlin/Unit| {
this@R|/Test|.D|/Test.x|.R|SubstitutionOverride</FreezableVar.setValue: R|kotlin/Unit|>|(this@R|/Test|, ::R|/Test.x|, R|<local>/x|)
@@ -50,7 +50,7 @@ FILE: delegateInference.kt
public final var y: R|kotlin/String|by R|/FreezableVar.FreezableVar|<R|kotlin/String|>(String())
public get(): R|kotlin/String| {
^ this@R|/Test|.D|/Test.y|.R|SubstitutionOverride</FreezableVar.getValue: R|kotlin/String|>|(this@R|/Test|, ::R|/Test.y|)
^ this@R|/Test|.D|/Test.y|.R|SubstitutionOverride</FreezableVar.getValue: R|Stub (builder inference): TypeVariable(_T)|>|(this@R|/Test|, ::R|/Test.y|)
}
public set(<set-?>: R|kotlin/String|): R|kotlin/Unit| {
this@R|/Test|.D|/Test.y|.R|SubstitutionOverride</FreezableVar.setValue: R|kotlin/Unit|>|(this@R|/Test|, ::R|/Test.y|, R|<local>/y|)
@@ -15,13 +15,23 @@ FILE: delegateWithArgInference.kt
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 <TT> makeDelegate(t: R|TT|): R|Delegate<TT>| {
^makeDelegate R|/Delegate.Delegate|<R|TT|>(R|<local>/t|)
}
public final fun <M> materialize(): R|M| {
^materialize Null(null)!!
}
public final fun <M2> materialize2(): R|M2| {
^materialize2 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 final val x: R|kotlin/Int|by R|/makeIntDelegate|(R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
lval x: R|kotlin/String| = R|/materialize|<R|kotlin/String|>()
^ R|/materialize2|<R|kotlin/Int|>()
}
))
public get(): R|kotlin/Int| {
^ D|/x|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/Int|>|(Null(null), ::R|/x|)
}
@@ -18,18 +18,20 @@ FILE: delegateWithLambda.kt
public final fun getAny(): R|kotlin/Any?| {
^getAny Null(null)
}
public final fun <Q> materialize(): R|Q| {
^materialize Null(null)!!
}
public final class Test : R|kotlin/Any| {
public constructor(): R|Test| {
super<R|kotlin/Any|>()
}
public final val x: R|kotlin/String|by R|/lazy|<R|kotlin/String|>(<L> = lazy@fun <anonymous>(): R|kotlin/String| <inline=NoInline> {
lval y: R|kotlin/String| = (R|/getAny|() as? R|kotlin/String|) ?: String()
^ R|<local>/y|
^ R|/materialize|<R|kotlin/String|>()
}
)
public get(): R|kotlin/String| {
^ this@R|/Test|.D|/Test.x|.R|SubstitutionOverride</LazyDelegate.getValue: R|kotlin/String|>|(this@R|/Test|, ::R|/Test.x|)
^ this@R|/Test|.D|/Test.x|.R|SubstitutionOverride</LazyDelegate.getValue: R|Stub (builder inference): TypeVariable(_T)|>|(this@R|/Test|, ::R|/Test.x|)
}
}
@@ -8,9 +8,10 @@ fun <T> lazy(block: () -> T): LazyDelegate<T> = LazyDelegate(block())
fun getAny(): Any? = null
fun <Q> materialize(): Q = null!!
class Test {
val x by lazy {
val y = getAny() as? String ?: ""
y
val x: String by lazy {
materialize()
}
}
@@ -38,9 +38,9 @@ FILE: provideDelegate.kt
super<R|kotlin/Any|>()
}
public final val x: R|kotlin/Int|by R|/delegate|<R|kotlin/Int|>(Int(1)).R|SubstitutionOverride</DelegateProvider.provideDelegate: R|Delegate<kotlin/Int>|>|(this@R|/A|, ::R|/A.x|)
public final val x: R|kotlin/Int|by R|/delegate|<R|kotlin/Int|>(Int(1)).R|SubstitutionOverride</DelegateProvider.provideDelegate: R|Delegate<Stub (builder inference): TypeVariable(_T)>|>|(this@R|/A|, ::R|/A.x|)
public get(): R|kotlin/Int| {
^ this@R|/A|.D|/A.x|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/Int|>|(this@R|/A|, ::R|/A.x|)
^ this@R|/A|.D|/A.x|.R|SubstitutionOverride</Delegate.getValue: R|Stub (builder inference): TypeVariable(_T)|>|(this@R|/A|, ::R|/A.x|)
}
}