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|)
}
}
@@ -35,7 +35,7 @@ FILE: delegateTypeMismatch.kt
public final var classifierNamePolicy: R|ClassifierNamePolicy|by this@R|/A|.R|/A.property|<R|ClassifierNamePolicy|>(Q|ClassifierNamePolicy.SOURCE_CODE_QUALIFIED|)
public get(): R|ClassifierNamePolicy| {
^ this@R|/A|.D|/A.classifierNamePolicy|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|ClassifierNamePolicy|>|(this@R|/A|, ::R|/A.classifierNamePolicy|)
^ this@R|/A|.D|/A.classifierNamePolicy|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|Stub (builder inference): TypeVariable(_T)|>|(this@R|/A|, ::R|/A.classifierNamePolicy|)
}
public set(<set-?>: R|ClassifierNamePolicy|): R|kotlin/Unit| {
this@R|/A|.D|/A.classifierNamePolicy|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.setValue: R|kotlin/Unit|>|(this@R|/A|, ::R|/A.classifierNamePolicy|, R|<local>/classifierNamePolicy|)
@@ -92,10 +92,10 @@ digraph delegateWithAnonymousObject_kt {
35 -> {36};
36 -> {37};
subgraph cluster_10 {
subgraph cluster_13 {
color=red
38 [label="Enter function getValue" style="filled" fillcolor=red];
subgraph cluster_11 {
subgraph cluster_14 {
color=blue
39 [label="Enter block"];
40 [label="Function call: R|/IssueListView.IssueListView|()"];
@@ -113,10 +113,10 @@ digraph delegateWithAnonymousObject_kt {
42 -> {43} [style=dotted];
43 -> {44} [style=dotted];
subgraph cluster_12 {
subgraph cluster_15 {
color=red
45 [label="Enter function setValue" style="filled" fillcolor=red];
subgraph cluster_13 {
subgraph cluster_16 {
color=blue
46 [label="Enter block"];
47 [label="Function call: R|/IssueListView.IssueListView|()"];
@@ -138,16 +138,16 @@ digraph delegateWithAnonymousObject_kt {
51 -> {52} [style=dotted];
52 -> {53} [style=dotted];
subgraph cluster_14 {
subgraph cluster_17 {
color=red
54 [label="Enter function getter" style="filled" fillcolor=red];
subgraph cluster_15 {
subgraph cluster_18 {
color=blue
55 [label="Enter block"];
56 [label="Access variable D|/IssuesListUserProfile.issueListView|"];
57 [label="Access variable this@R|/IssuesListUserProfile|"];
58 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|IssueListView|>|(...)"];
59 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|IssueListView|>|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"];
58 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|Stub (builder inference): TypeVariable(_Target)|>|(...)"];
59 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|Stub (builder inference): TypeVariable(_Target)|>|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"];
60 [label="Stub" style="filled" fillcolor=gray];
61 [label="Exit block" style="filled" fillcolor=gray];
}
@@ -163,10 +163,10 @@ digraph delegateWithAnonymousObject_kt {
60 -> {61} [style=dotted];
61 -> {62} [style=dotted];
subgraph cluster_16 {
subgraph cluster_19 {
color=red
63 [label="Enter function setter" style="filled" fillcolor=red];
subgraph cluster_17 {
subgraph cluster_20 {
color=blue
64 [label="Enter block"];
65 [label="Access variable D|/IssuesListUserProfile.issueListView|"];
@@ -185,7 +185,7 @@ digraph delegateWithAnonymousObject_kt {
68 -> {69};
69 -> {70};
subgraph cluster_18 {
subgraph cluster_21 {
color=red
71 [label="Enter property" style="filled" fillcolor=red];
72 [label="Postponed enter to lambda"];
@@ -217,7 +217,8 @@ digraph delegateWithAnonymousObject_kt {
80 [label="Exit property" style="filled" fillcolor=red];
}
70 -> {71};
71 -> {72} [color=red];
71 -> {72};
71 -> {26} [style=dashed];
71 -> {72};
72 -> {73};
72 -> {} [style=dashed];
@@ -41,7 +41,7 @@ FILE: delegateWithAnonymousObject.kt
}
)
public get(): R|IssueListView| {
^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|IssueListView|>|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)
^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|Stub (builder inference): TypeVariable(_Target)|>|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)
}
public set(<set-?>: R|IssueListView|): R|kotlin/Unit| {
this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.setValue: R|kotlin/Unit|>|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|, R|<local>/issueListView|)
@@ -25,12 +25,12 @@ FILE: kt41917.kt
public final val implicit: R|kotlin/String|by R|/DummyDelegate.DummyDelegate|<R|kotlin/String|>(String(hello))
public get(): R|kotlin/String| {
^ this@R|/A|.D|/A.implicit|.R|SubstitutionOverride</DummyDelegate.getValue: R|kotlin/String|>|(this@R|/A|, ::R|/A.implicit|)
^ this@R|/A|.D|/A.implicit|.R|SubstitutionOverride</DummyDelegate.getValue: R|Stub (builder inference): TypeVariable(_V)|>|(this@R|/A|, ::R|/A.implicit|)
}
public final val explicit: R|kotlin/String|by R|/DummyDelegate.DummyDelegate|<R|kotlin/String|>(String(hello))
public get(): R|kotlin/String| {
^ this@R|/A|.D|/A.explicit|.R|SubstitutionOverride</DummyDelegate.getValue: R|kotlin/String|>|(this@R|/A|, ::R|/A.explicit|)
^ this@R|/A|.D|/A.explicit|.R|SubstitutionOverride</DummyDelegate.getValue: R|Stub (builder inference): TypeVariable(_V)|>|(this@R|/A|, ::R|/A.explicit|)
}
}
@@ -26,7 +26,7 @@ FILE: propertyWithFunctionalType.kt
}
)
public get(): R|(B) -> B| {
^ this@R|/A|.D|/A.conventerWithExpectedType|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|(B) -> B|>|(this@R|/A|, ::R|/A.conventerWithExpectedType|)
^ this@R|/A|.D|/A.conventerWithExpectedType|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|Stub (builder inference): TypeVariable(_T)|>|(this@R|/A|, ::R|/A.conventerWithExpectedType|)
}
public set(<set-?>: R|(B) -> B|): R|kotlin/Unit| {
this@R|/A|.D|/A.conventerWithExpectedType|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.setValue: R|kotlin/Unit|>|(this@R|/A|, ::R|/A.conventerWithExpectedType|, R|<local>/conventerWithExpectedType|)
@@ -30,14 +30,14 @@ FILE: hideBySeverity.kt
super<R|BaseState|>()
}
public final val hideBySeverityDerived: R|kotlin/collections/MutableSet<kotlin/Int>|by this@R|/Some|.R|/BaseState.propertyDerived|<R|kotlin/collections/MutableSet<kotlin/Int>|>(R|kotlin/collections/mutableSetOf|<R|kotlin/Int|>()).R|SubstitutionOverride</StoredPropertyDerived.provideDelegate: R|StoredPropertyBase<kotlin/collections/MutableSet<kotlin/Int>>|>|(this@R|/Some|, ::R|/Some.hideBySeverityDerived|)
public final val hideBySeverityDerived: R|kotlin/collections/MutableSet<kotlin/Int>|by this@R|/Some|.R|/BaseState.propertyDerived|<R|kotlin/collections/MutableSet<kotlin/Int>|>(R|kotlin/collections/mutableSetOf|<R|kotlin/Int|>()).R|SubstitutionOverride</StoredPropertyDerived.provideDelegate: R|StoredPropertyBase<Stub (builder inference): TypeVariable(_PROPERTY_TYPE)>|>|(this@R|/Some|, ::R|/Some.hideBySeverityDerived|)
public get(): R|kotlin/collections/MutableSet<kotlin/Int>| {
^ this@R|/Some|.D|/Some.hideBySeverityDerived|.R|SubstitutionOverride</StoredPropertyBase.getValue: R|kotlin/collections/MutableSet<kotlin/Int>|>|(this@R|/Some|, ::R|/Some.hideBySeverityDerived|)
^ this@R|/Some|.D|/Some.hideBySeverityDerived|.R|SubstitutionOverride</StoredPropertyBase.getValue: R|Stub (builder inference): TypeVariable(_PROPERTY_TYPE)|>|(this@R|/Some|, ::R|/Some.hideBySeverityDerived|)
}
public final val hideBySeverityBase: R|kotlin/collections/MutableSet<kotlin/Int>|by this@R|/Some|.R|/BaseState.propertyBase|<R|kotlin/collections/MutableSet<kotlin/Int>|>(R|kotlin/collections/mutableSetOf|<R|kotlin/Int|>())
public get(): R|kotlin/collections/MutableSet<kotlin/Int>| {
^ this@R|/Some|.D|/Some.hideBySeverityBase|.R|SubstitutionOverride</StoredPropertyBase.getValue: R|kotlin/collections/MutableSet<kotlin/Int>|>|(this@R|/Some|, ::R|/Some.hideBySeverityBase|)
^ this@R|/Some|.D|/Some.hideBySeverityBase|.R|SubstitutionOverride</StoredPropertyBase.getValue: R|Stub (builder inference): TypeVariable(_PROPERTY_TYPE)|>|(this@R|/Some|, ::R|/Some.hideBySeverityBase|)
}
}