[FIR] add reversed testData to update it in the next commit

^KT-56543
This commit is contained in:
Dmitrii Gridin
2023-04-05 08:55:16 +02:00
committed by Space Team
parent cc52e896f9
commit 1c5aa6c45b
62 changed files with 695 additions and 36 deletions
@@ -1,4 +1,3 @@
// IGNORE_REVERSED_RESOLVE
// FIR_DUMP
// WITH_REFLECT
@@ -1,4 +1,3 @@
// IGNORE_REVERSED_RESOLVE
// FIR_DUMP
// WITH_REFLECT
@@ -0,0 +1,95 @@
FILE: kt50994.fir.kt
public final class ProcessorWithParent : R|Entity| {
public constructor(): R|ProcessorWithParent| {
super<R|kotlin/Any|>()
}
public final var processor: R|ProcessorWithChildren?|by this@R|/ProcessorWithParent|.R|/parent|<R|ProcessorWithParent|, R|ProcessorWithChildren|>(Q|ProcessorWithChildren|::R|/ProcessorWithChildren.processors|)
public get(): R|ProcessorWithChildren?| {
^ this@R|/ProcessorWithParent|.D|/ProcessorWithParent.processor|.R|SubstitutionOverride</Delegate.getValue: R|Stub (chain inference): TypeVariable(_TP)?|>|(this@R|/ProcessorWithParent|, ::R|/ProcessorWithParent.processor|)
}
public set(<set-?>: R|ProcessorWithChildren?|): R|kotlin/Unit| {
this@R|/ProcessorWithParent|.D|/ProcessorWithParent.processor|.R|SubstitutionOverride</Delegate.setValue: R|kotlin/Unit|>|(this@R|/ProcessorWithParent|, ::R|/ProcessorWithParent.processor|, R|<local>/processor|)
}
}
public final class ProcessorWithChildren : R|Entity| {
public constructor(): R|ProcessorWithChildren| {
super<R|kotlin/Any|>()
}
public final var processors: R|kotlin/collections/MutableCollection<ERROR CLASS: Type for TC is not inferred>|by this@R|/ProcessorWithChildren|.R|/children<Inapplicable(INAPPLICABLE): /children>#|<<ERROR TYPE REF: Type for SC is not inferred>, <ERROR TYPE REF: Type for TC is not inferred>>(<getClass>(Q|ProcessorWithParent|).R|kotlin/jvm/java|<R|ProcessorWithParent|>, Q|ProcessorWithParent|::<Unresolved reference: processor>#)
public get(): R|kotlin/collections/MutableCollection<ERROR CLASS: Type for TC is not inferred>| {
^ this@R|/ProcessorWithChildren|.D|/ProcessorWithChildren.processors|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/collections/MutableCollection<Stub (chain inference): TypeVariable(_TC)>|>|(this@R|/ProcessorWithChildren|, ::R|/ProcessorWithChildren.processors|)
}
public set(<set-?>: R|kotlin/collections/MutableCollection<ERROR CLASS: Type for TC is not inferred>|): R|kotlin/Unit| {
this@R|/ProcessorWithChildren|.D|/ProcessorWithChildren.processors|.R|SubstitutionOverride</Delegate.setValue: R|kotlin/Unit|>|(this@R|/ProcessorWithChildren|, ::R|/ProcessorWithChildren.processors|, R|<local>/processors|)
}
}
public final class Processor2WithParent : R|Entity| {
public constructor(): R|Processor2WithParent| {
super<R|kotlin/Any|>()
}
public final var processor: R|Processor2WithChildren?|by this@R|/Processor2WithParent|.R|/parent|<R|Processor2WithParent|, R|Processor2WithChildren|>(Q|Processor2WithChildren|::R|/Processor2WithChildren.processors|)
public get(): R|Processor2WithChildren?| {
^ this@R|/Processor2WithParent|.D|/Processor2WithParent.processor|.R|SubstitutionOverride</Delegate.getValue: R|Processor2WithChildren?|>|(this@R|/Processor2WithParent|, ::R|/Processor2WithParent.processor|)
}
public set(<set-?>: R|Processor2WithChildren?|): R|kotlin/Unit| {
this@R|/Processor2WithParent|.D|/Processor2WithParent.processor|.R|SubstitutionOverride</Delegate.setValue: R|kotlin/Unit|>|(this@R|/Processor2WithParent|, ::R|/Processor2WithParent.processor|, R|<local>/processor|)
}
}
public final class Processor2WithChildren : R|Entity| {
public constructor(): R|Processor2WithChildren| {
super<R|kotlin/Any|>()
}
public final var processors: R|kotlin/collections/MutableCollection<Processor2WithParent>|by this@R|/Processor2WithChildren|.R|/children|<R|Processor2WithChildren|, R|Processor2WithParent|>(<getClass>(Q|Processor2WithParent|).R|kotlin/jvm/java|<R|Processor2WithParent|>, Q|Processor2WithParent|::R|/Processor2WithParent.processor|)
public get(): R|kotlin/collections/MutableCollection<Processor2WithParent>| {
^ this@R|/Processor2WithChildren|.D|/Processor2WithChildren.processors|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/collections/MutableCollection<Stub (chain inference): TypeVariable(_TC)>|>|(this@R|/Processor2WithChildren|, ::R|/Processor2WithChildren.processors|)
}
public set(<set-?>: R|kotlin/collections/MutableCollection<Processor2WithParent>|): R|kotlin/Unit| {
this@R|/Processor2WithChildren|.D|/Processor2WithChildren.processors|.R|SubstitutionOverride</Delegate.setValue: R|kotlin/Unit|>|(this@R|/Processor2WithChildren|, ::R|/Processor2WithChildren.processors|, R|<local>/processors|)
}
}
public final class Processor3WithParent : R|Entity| {
public constructor(): R|Processor3WithParent| {
super<R|kotlin/Any|>()
}
public final var processor: R|Processor3WithChildren?|by this@R|/Processor3WithParent|.R|/parent|<R|Processor3WithParent|, R|Processor3WithChildren|>(Q|Processor3WithChildren|::R|/Processor3WithChildren.processors|)
public get(): R|Processor3WithChildren?| {
^ this@R|/Processor3WithParent|.D|/Processor3WithParent.processor|.R|SubstitutionOverride</Delegate.getValue: R|Processor3WithChildren?|>|(this@R|/Processor3WithParent|, ::R|/Processor3WithParent.processor|)
}
public set(<set-?>: R|Processor3WithChildren?|): R|kotlin/Unit| {
this@R|/Processor3WithParent|.D|/Processor3WithParent.processor|.R|SubstitutionOverride</Delegate.setValue: R|kotlin/Unit|>|(this@R|/Processor3WithParent|, ::R|/Processor3WithParent.processor|, R|<local>/processor|)
}
}
public final class Processor3WithChildren : R|Entity| {
public constructor(): R|Processor3WithChildren| {
super<R|kotlin/Any|>()
}
public final var processors: R|kotlin/collections/MutableCollection<Processor3WithParent>|by this@R|/Processor3WithChildren|.R|/children|<R|Processor3WithChildren|, R|Processor3WithParent|>(<getClass>(Q|Processor3WithParent|).R|kotlin/jvm/java|<R|Processor3WithParent|>, Q|Processor3WithParent|::R|/Processor3WithParent.processor|)
public get(): R|kotlin/collections/MutableCollection<Processor3WithParent>| {
^ this@R|/Processor3WithChildren|.D|/Processor3WithChildren.processors|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/collections/MutableCollection<Stub (chain inference): TypeVariable(_TC)>|>|(this@R|/Processor3WithChildren|, ::R|/Processor3WithChildren.processors|)
}
public set(<set-?>: R|kotlin/collections/MutableCollection<Processor3WithParent>|): R|kotlin/Unit| {
this@R|/Processor3WithChildren|.D|/Processor3WithChildren.processors|.R|SubstitutionOverride</Delegate.setValue: R|kotlin/Unit|>|(this@R|/Processor3WithChildren|, ::R|/Processor3WithChildren.processors|, R|<local>/processors|)
}
}
public final inline fun <reified SP : R|Entity|, reified TP : R|Entity|> R|SP|.parent(property: R|kotlin/reflect/KProperty1<TP, kotlin/collections/MutableCollection<SP>>|): R|Delegate<SP, TP?>| {
^parent Null(null)!!
}
public final fun <SC : R|Entity|, TC : R|Entity|> R|SC|.children(clazz: R|java/lang/Class<TC>|, property: R|kotlin/reflect/KProperty1<TC, SC?>|, name: R|kotlin/String| = R|<local>/property|.R|SubstitutionOverride<kotlin/reflect/KProperty1.name: R|kotlin/String|>|): R|Delegate<SC, kotlin/collections/MutableCollection<TC>>| {
^children Null(null)!!
}
public abstract interface Delegate<R : R|Entity|, T> : R|kotlin/properties/ReadWriteProperty<R, T>| {
}
public abstract interface Entity : R|kotlin/Any| {
}
@@ -0,0 +1,41 @@
// FIR_DUMP
// WITH_REFLECT
import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty1
class ProcessorWithParent : Entity {
var processor by parent(ProcessorWithChildren::processors)
}
class ProcessorWithChildren : Entity {
var processors by <!INAPPLICABLE_CANDIDATE!>children<!>(ProcessorWithParent::class.java, ProcessorWithParent::<!UNRESOLVED_REFERENCE!>processor<!>)
}
class Processor2WithParent : Entity {
var processor: Processor2WithChildren? by parent(Processor2WithChildren::processors)
}
class Processor2WithChildren : Entity {
var processors by children(Processor2WithParent::class.java, Processor2WithParent::processor)
}
class Processor3WithParent : Entity {
var processor by parent(Processor3WithChildren::processors)
}
class Processor3WithChildren : Entity {
var processors: MutableCollection<Processor3WithParent> by children(Processor3WithParent::class.java, Processor3WithParent::processor)
}
inline fun <reified SP : Entity, reified TP : Entity> SP.parent(
property: KProperty1<TP, MutableCollection<SP>>
): Delegate<SP, TP?> = null!!
fun <SC : Entity, TC : Entity> SC.children(
clazz: Class<TC>, property: KProperty1<TC, SC?>, name: String = property.name
): Delegate<SC, MutableCollection<TC>> = null!!
interface Delegate<R : Entity, T> : ReadWriteProperty<R, T>
interface Entity