diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DumpIrTree.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DumpIrTree.kt index 626ea5ae789..dee895539f9 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DumpIrTree.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DumpIrTree.kt @@ -132,7 +132,6 @@ class DumpIrTreeVisitor(out: Appendable): IrElementVisitor { override fun visitMemberAccess(expression: IrMemberAccessExpression, data: String) { expression.dumpLabeledElementWith(data) { dumpTypeArguments(expression) - expression.dispatchReceiver?.accept(this, "\$this") expression.extensionReceiver?.accept(this, "\$receiver") for (valueParameter in expression.descriptor.valueParameters) { @@ -143,9 +142,11 @@ class DumpIrTreeVisitor(out: Appendable): IrElementVisitor { private fun dumpTypeArguments(expression: IrMemberAccessExpression) { for (typeParameter in expression.descriptor.original.typeParameters) { - val typeArgument = expression.getTypeArgument(typeParameter) ?: continue val renderedParameter = DescriptorRenderer.ONLY_NAMES_WITH_SHORT_TYPES.render(typeParameter) - val renderedType = DescriptorRenderer.ONLY_NAMES_WITH_SHORT_TYPES.renderType(typeArgument) + val typeArgument = expression.getTypeArgument(typeParameter) + val renderedType = typeArgument?.let { + DescriptorRenderer.ONLY_NAMES_WITH_SHORT_TYPES.renderType(typeArgument) + } ?: "null" printer.println("$renderedParameter: $renderedType") } } diff --git a/compiler/testData/ir/irText/classes/classes.txt b/compiler/testData/ir/irText/classes/classes.txt index 175a5946ae5..3406829e92e 100644 --- a/compiler/testData/ir/irText/classes/classes.txt +++ b/compiler/testData/ir/irText/classes/classes.txt @@ -48,6 +48,7 @@ FILE /classes.kt CONSTRUCTOR private constructor TestEnumClass() BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' + >: null INSTANCE_INITIALIZER_CALL classDescriptor='TestEnumClass' FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any $this: VALUE_PARAMETER this@Enum: Enum diff --git a/compiler/testData/ir/irText/classes/dataClassesGeneric.txt b/compiler/testData/ir/irText/classes/dataClassesGeneric.txt index 8a598b0c00d..b10be6d2246 100644 --- a/compiler/testData/ir/irText/classes/dataClassesGeneric.txt +++ b/compiler/testData/ir/irText/classes/dataClassesGeneric.txt @@ -32,6 +32,7 @@ FILE /dataClassesGeneric.kt BLOCK_BODY RETURN type=kotlin.Nothing from='copy(T = ...): Test1' CALL 'constructor Test1(T)' type=Test1 origin=null + : null x: GET_VAR 'value-parameter x: T = ...' type=T origin=null FUN GENERATED_DATA_CLASS_MEMBER public open override fun toString(): kotlin.String $this: VALUE_PARAMETER this@Test1: Test1 diff --git a/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt b/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt index 40c2568290a..d8fbd3ebfd6 100644 --- a/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt +++ b/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt @@ -31,6 +31,7 @@ FILE /delegatingConstructorCallToTypeAliasConstructor.kt CONSTRUCTOR public constructor C1() BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Cell(String)' + : null value: CONST String type=kotlin.String value='O' INSTANCE_INITIALIZER_CALL classDescriptor='C1' PROPERTY FAKE_OVERRIDE public final override val value: kotlin.String @@ -48,6 +49,7 @@ FILE /delegatingConstructorCallToTypeAliasConstructor.kt CONSTRUCTOR public constructor C2() BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Cell(String)' + : null value: CONST String type=kotlin.String value='K' INSTANCE_INITIALIZER_CALL classDescriptor='C2' PROPERTY FAKE_OVERRIDE public final override val value: kotlin.String diff --git a/compiler/testData/ir/irText/classes/enum.txt b/compiler/testData/ir/irText/classes/enum.txt index 6f2cd6b3e7e..25fba0fe8f0 100644 --- a/compiler/testData/ir/irText/classes/enum.txt +++ b/compiler/testData/ir/irText/classes/enum.txt @@ -4,6 +4,7 @@ FILE /enum.kt CONSTRUCTOR private constructor TestEnum1() BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' + >: null INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum1' ENUM_ENTRY enum entry TEST1 init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum1()' @@ -42,6 +43,7 @@ FILE /enum.kt VALUE_PARAMETER value-parameter x: kotlin.Int BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' + >: null INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum2' PROPERTY public final val x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int @@ -94,6 +96,7 @@ FILE /enum.kt CONSTRUCTOR private constructor TestEnum3() BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' + >: null INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum3' ENUM_ENTRY enum entry TEST init: ENUM_CONSTRUCTOR_CALL 'constructor TEST()' @@ -165,6 +168,7 @@ FILE /enum.kt VALUE_PARAMETER value-parameter x: kotlin.Int BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' + >: null INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum4' PROPERTY public final val x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int @@ -305,6 +309,7 @@ FILE /enum.kt CONST Int type=kotlin.Int value='0' BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' + >: null INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum5' PROPERTY public final val x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int diff --git a/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.txt b/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.txt index b37db531296..84b2127afd9 100644 --- a/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.txt +++ b/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.txt @@ -5,6 +5,7 @@ FILE /enumWithSecondaryCtor.kt VALUE_PARAMETER value-parameter x: kotlin.Int BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' + >: null INSTANCE_INITIALIZER_CALL classDescriptor='Test0' PROPERTY public final val x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int @@ -55,6 +56,7 @@ FILE /enumWithSecondaryCtor.kt VALUE_PARAMETER value-parameter x: kotlin.Int BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' + >: null INSTANCE_INITIALIZER_CALL classDescriptor='Test1' PROPERTY public final val x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int @@ -108,6 +110,7 @@ FILE /enumWithSecondaryCtor.kt VALUE_PARAMETER value-parameter x: kotlin.Int BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' + >: null INSTANCE_INITIALIZER_CALL classDescriptor='Test2' PROPERTY public final val x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int diff --git a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.txt b/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.txt index 7b656bae01d..77656fcb331 100644 --- a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.txt +++ b/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.txt @@ -55,6 +55,7 @@ FILE /dataClassMembers.kt BLOCK_BODY RETURN type=kotlin.Nothing from='copy(T = ..., String = ...): Test' CALL 'constructor Test(T, String = ...)' type=Test origin=null + : null x: GET_VAR 'value-parameter x: T = ...' type=T origin=null y: GET_VAR 'value-parameter y: String = ...' type=kotlin.String origin=null FUN GENERATED_DATA_CLASS_MEMBER public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.txt b/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.txt index 5f2116b9a58..c508085aa80 100644 --- a/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.txt +++ b/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.txt @@ -38,6 +38,7 @@ FILE /delegatedMembers.kt VALUE_PARAMETER value-parameter x: X BLOCK_BODY CALL 'qux(TT, X): Unit' type=kotlin.Unit origin=null + : null $this: GET_FIELD '`Test$IBase$delegate`: IBase' type=IBase origin=null receiver: GET_VAR 'this@Test: Test' type=Test origin=null t: GET_VAR 'value-parameter t: TT' type=TT origin=null diff --git a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.txt b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.txt index 661775a2d4e..c075f320206 100644 --- a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.txt +++ b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.txt @@ -4,6 +4,7 @@ FILE /enumEntryAsReceiver.kt CONSTRUCTOR private constructor X() BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' + >: null INSTANCE_INITIALIZER_CALL classDescriptor='X' ENUM_ENTRY enum entry B init: ENUM_CONSTRUCTOR_CALL 'constructor B()' diff --git a/compiler/testData/ir/irText/expressions/objectAsCallable.txt b/compiler/testData/ir/irText/expressions/objectAsCallable.txt index a4c3876382d..bff4325d390 100644 --- a/compiler/testData/ir/irText/expressions/objectAsCallable.txt +++ b/compiler/testData/ir/irText/expressions/objectAsCallable.txt @@ -17,6 +17,7 @@ FILE /objectAsCallable.kt CONSTRUCTOR private constructor En() BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' + >: null INSTANCE_INITIALIZER_CALL classDescriptor='En' ENUM_ENTRY enum entry X init: ENUM_CONSTRUCTOR_CALL 'constructor En()' diff --git a/compiler/testData/ir/irText/expressions/values.txt b/compiler/testData/ir/irText/expressions/values.txt index a90e772acfa..b7d151b0d4e 100644 --- a/compiler/testData/ir/irText/expressions/values.txt +++ b/compiler/testData/ir/irText/expressions/values.txt @@ -4,6 +4,7 @@ FILE /values.kt CONSTRUCTOR private constructor Enum() BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' + >: null INSTANCE_INITIALIZER_CALL classDescriptor='Enum' ENUM_ENTRY enum entry A init: ENUM_CONSTRUCTOR_CALL 'constructor Enum()' diff --git a/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.txt b/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.txt index 7f9a2c5729c..f015e9ed2d3 100644 --- a/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.txt +++ b/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.txt @@ -30,8 +30,10 @@ FILE /typeAliasCtorForGenericClass.kt BLOCK_BODY VAR val b: B /* = A */ CALL 'constructor A(Int)' type=A origin=null + : null q: CONST Int type=kotlin.Int value='2' VAR val b2: B2 /* = A> */ CALL 'constructor A(A)' type=A> origin=null + : null q: GET_VAR 'b: B /* = A */' type=B /* = A */ origin=null diff --git a/compiler/testData/ir/irText/singletons/enumEntry.txt b/compiler/testData/ir/irText/singletons/enumEntry.txt index f4c32704c7b..ce3a426361e 100644 --- a/compiler/testData/ir/irText/singletons/enumEntry.txt +++ b/compiler/testData/ir/irText/singletons/enumEntry.txt @@ -4,6 +4,7 @@ FILE /enumEntry.kt CONSTRUCTOR private constructor Z() BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' + >: null INSTANCE_INITIALIZER_CALL classDescriptor='Z' ENUM_ENTRY enum entry ENTRY init: ENUM_CONSTRUCTOR_CALL 'constructor ENTRY()'