From 6f6bdd8aecc18df1138fd7c6ec455450ba9c6419 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Fri, 14 Jan 2022 01:46:04 +0100 Subject: [PATCH] IR: change acceptChildren/transformChildren order in IrClass Traverse properties of supertypes first, and then handle thisReceiver. This will simplify transition to auto-generated IR. --- .../org/jetbrains/kotlin/ir/declarations/IrClass.kt | 4 ++-- .../augmentedAssignmentWithExpression.txt | 2 +- compiler/testData/ir/sourceRanges/comments.txt | 4 ++-- .../ir/sourceRanges/declarations/classFuns.txt | 2 +- .../ir/sourceRanges/declarations/classProperties.txt | 2 +- .../ir/sourceRanges/declarations/classes.txt | 12 ++++++------ .../ir/sourceRanges/declarations/fakeOverrides.txt | 2 +- .../ir/sourceRanges/declarations/kt29862.txt | 6 +++--- .../declarations/primaryConstructors.txt | 8 ++++---- .../declarations/secondaryConstructors.txt | 2 +- .../declarations/synthesizedDataClassMembers.txt | 2 +- compiler/testData/ir/sourceRanges/kt17108.txt | 2 +- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrClass.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrClass.kt index a6882f3c749..65cd9d2142d 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrClass.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrClass.kt @@ -46,14 +46,14 @@ abstract class IrClass : visitor.visitClass(this, data) override fun acceptChildren(visitor: IrElementVisitor, data: D) { - thisReceiver?.accept(visitor, data) typeParameters.forEach { it.accept(visitor, data) } declarations.forEach { it.accept(visitor, data) } + thisReceiver?.accept(visitor, data) } override fun transformChildren(transformer: IrElementTransformer, data: D) { - thisReceiver = thisReceiver?.transform(transformer, data) typeParameters = typeParameters.transformIfNeeded(transformer, data) declarations.transformInPlace(transformer, data) + thisReceiver = thisReceiver?.transform(transformer, data) } } diff --git a/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.txt b/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.txt index 0a37081b884..44eacc39be9 100644 --- a/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.txt +++ b/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.txt @@ -1,6 +1,5 @@ @0:0..23:0 FILE fqName:test fileName:/augmentedAssignmentWithExpression.kt @2:0..8:1 CLASS CLASS name:Host modality:FINAL visibility:public superTypes:[kotlin.Any] - @2:0..8:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:test.Host @2:0..8:1 CONSTRUCTOR visibility:public <> () returnType:test.Host [primary] @2:0..8:1 BLOCK_BODY @2:0..8:1 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @@ -22,6 +21,7 @@ @2:0..8:1 VALUE_PARAMETER name: type:kotlin.Any @2:0..8:1 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @2:0..8:1 VALUE_PARAMETER name: type:kotlin.Any + @2:0..8:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:test.Host @10:0..18 FUN name:foo visibility:public modality:FINAL <> () returnType:test.Host @10:12..18 BLOCK_BODY @10:18..18 RETURN type=kotlin.Nothing from='public final fun foo (): test.Host declared in test' diff --git a/compiler/testData/ir/sourceRanges/comments.txt b/compiler/testData/ir/sourceRanges/comments.txt index d6c45a82fde..af49d320200 100644 --- a/compiler/testData/ir/sourceRanges/comments.txt +++ b/compiler/testData/ir/sourceRanges/comments.txt @@ -1,12 +1,10 @@ @0:0..33:1 FILE fqName: fileName:/comments.kt @1:0..33:1 CLASS CLASS name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any] - @1:0..33:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Foo @1:0..33:1 CONSTRUCTOR visibility:public <> () returnType:.Foo [primary] @1:0..33:1 BLOCK_BODY @1:0..33:1 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @1:0..33:1 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]' @8:4..10:36 CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] - @8:4..10:36 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Foo.Inner @8:60..10:36 CONSTRUCTOR visibility:private <> ($this:.Foo, x:kotlin.Int) returnType:.Foo.Inner [primary] @8:52..79 VALUE_PARAMETER name: type:.Foo @8:72..78 VALUE_PARAMETER name:x index:0 type:kotlin.Int @@ -20,6 +18,7 @@ @8:4..10:36 VALUE_PARAMETER name: type:kotlin.Any @8:10..10:36 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @8:4..10:36 VALUE_PARAMETER name: type:kotlin.Any + @8:4..10:36 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Foo.Inner @18:19..20:39 FUN name:foo visibility:protected modality:OPEN <> ($this:.Foo, y:kotlin.Int) returnType:kotlin.Unit @18:4..20:39 VALUE_PARAMETER name: type:.Foo @18:27..33 VALUE_PARAMETER name:y index:0 type:kotlin.Int @@ -49,3 +48,4 @@ @1:0..33:1 VALUE_PARAMETER name: type:kotlin.Any @1:0..33:1 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @1:0..33:1 VALUE_PARAMETER name: type:kotlin.Any + @1:0..33:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Foo diff --git a/compiler/testData/ir/sourceRanges/declarations/classFuns.txt b/compiler/testData/ir/sourceRanges/declarations/classFuns.txt index 0a835af9203..f082df05a5e 100644 --- a/compiler/testData/ir/sourceRanges/declarations/classFuns.txt +++ b/compiler/testData/ir/sourceRanges/declarations/classFuns.txt @@ -1,6 +1,5 @@ @0:0..23:1 FILE fqName:test fileName:/classFuns.kt @3:0..23:1 CLASS CLASS name:Test modality:FINAL visibility:public superTypes:[kotlin.Any] - @3:0..23:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:test.Test @3:0..23:1 CONSTRUCTOR visibility:public <> () returnType:test.Test [primary] @3:0..23:1 BLOCK_BODY @3:0..23:1 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @@ -24,3 +23,4 @@ @3:0..23:1 VALUE_PARAMETER name: type:kotlin.Any @3:0..23:1 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @3:0..23:1 VALUE_PARAMETER name: type:kotlin.Any + @3:0..23:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:test.Test diff --git a/compiler/testData/ir/sourceRanges/declarations/classProperties.txt b/compiler/testData/ir/sourceRanges/declarations/classProperties.txt index 84d0958b56e..85f4c4f1917 100644 --- a/compiler/testData/ir/sourceRanges/declarations/classProperties.txt +++ b/compiler/testData/ir/sourceRanges/declarations/classProperties.txt @@ -1,6 +1,5 @@ @0:0..77:1 FILE fqName:test fileName:/classProperties.kt @2:0..77:1 CLASS CLASS name:Test modality:FINAL visibility:public superTypes:[kotlin.Any] - @2:0..77:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:test.Test @2:0..77:1 CONSTRUCTOR visibility:public <> () returnType:test.Test [primary] @2:0..77:1 BLOCK_BODY @2:0..77:1 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @@ -178,3 +177,4 @@ @2:0..77:1 VALUE_PARAMETER name: type:kotlin.Any @2:0..77:1 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @2:0..77:1 VALUE_PARAMETER name: type:kotlin.Any + @2:0..77:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:test.Test diff --git a/compiler/testData/ir/sourceRanges/declarations/classes.txt b/compiler/testData/ir/sourceRanges/declarations/classes.txt index 2cb4c072d99..d171f858b7d 100644 --- a/compiler/testData/ir/sourceRanges/declarations/classes.txt +++ b/compiler/testData/ir/sourceRanges/declarations/classes.txt @@ -1,6 +1,5 @@ @0:0..22:11 FILE fqName: fileName:/classes.kt @0:0..11 CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[kotlin.Any] - @0:0..11 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1 @0:0..11 CONSTRUCTOR visibility:public <> () returnType:.Test1 [primary] @0:0..11 BLOCK_BODY @0:0..11 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @@ -12,8 +11,8 @@ @0:0..11 VALUE_PARAMETER name: type:kotlin.Any @0:0..11 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @0:0..11 VALUE_PARAMETER name: type:kotlin.Any + @0:0..11 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1 @3:0..4:11 CLASS CLASS name:Test2 modality:FINAL visibility:internal superTypes:[kotlin.Any] - @3:0..4:11 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2 @4:0..11 CONSTRUCTOR visibility:public <> () returnType:.Test2 [primary] @3:0..4:11 BLOCK_BODY @3:0..4:11 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @@ -25,8 +24,8 @@ @3:0..4:11 VALUE_PARAMETER name: type:kotlin.Any @4:0..11 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @3:0..4:11 VALUE_PARAMETER name: type:kotlin.Any + @3:0..4:11 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2 @10:0..11 CLASS CLASS name:Test3 modality:FINAL visibility:public superTypes:[kotlin.Any] - @10:0..11 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test3 @10:0..11 CONSTRUCTOR visibility:public <> () returnType:.Test3 [primary] @10:0..11 BLOCK_BODY @10:0..11 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @@ -38,8 +37,8 @@ @10:0..11 VALUE_PARAMETER name: type:kotlin.Any @10:0..11 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @10:0..11 VALUE_PARAMETER name: type:kotlin.Any + @10:0..11 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test3 @13:0..14:11 CLASS CLASS name:Test4 modality:FINAL visibility:public superTypes:[kotlin.Any] - @13:0..14:11 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test4 @14:0..11 CONSTRUCTOR visibility:public <> () returnType:.Test4 [primary] @13:0..14:11 BLOCK_BODY @13:0..14:11 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @@ -51,8 +50,8 @@ @13:0..14:11 VALUE_PARAMETER name: type:kotlin.Any @14:0..11 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @13:0..14:11 VALUE_PARAMETER name: type:kotlin.Any + @13:0..14:11 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test4 @17:0..18:11 CLASS ENUM_CLASS name:Test5 modality:FINAL visibility:public superTypes:[kotlin.Enum<.Test5>] - @17:0..18:11 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test5 @18:0..11 CONSTRUCTOR visibility:private <> () returnType:.Test5 [primary] @17:0..18:11 BLOCK_BODY @17:0..18:11 ENUM_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' @@ -84,8 +83,8 @@ @-1:-1..-1 FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:.Test5 @-1:-1..-1 VALUE_PARAMETER name:value index:0 type:kotlin.String @-1:-1..-1 SYNTHETIC_BODY kind=ENUM_VALUEOF + @17:0..18:11 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test5 @21:0..22:11 CLASS ANNOTATION_CLASS name:Test6 modality:OPEN visibility:public superTypes:[kotlin.Annotation] - @21:0..22:11 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test6 @22:0..11 CONSTRUCTOR visibility:public <> () returnType:.Test6 [primary] @21:0..22:11 BLOCK_BODY @21:0..22:11 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @@ -97,3 +96,4 @@ @21:0..22:11 VALUE_PARAMETER name: type:kotlin.Any @22:0..11 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @21:0..22:11 VALUE_PARAMETER name: type:kotlin.Any + @21:0..22:11 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test6 diff --git a/compiler/testData/ir/sourceRanges/declarations/fakeOverrides.txt b/compiler/testData/ir/sourceRanges/declarations/fakeOverrides.txt index 73780517ee6..863def43801 100644 --- a/compiler/testData/ir/sourceRanges/declarations/fakeOverrides.txt +++ b/compiler/testData/ir/sourceRanges/declarations/fakeOverrides.txt @@ -1,6 +1,5 @@ @0:0..10 FILE fqName: fileName:/fakeOverrides.kt @0:0..10 CLASS CLASS name:Test modality:FINAL visibility:public superTypes:[kotlin.Any] - @0:0..10 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test @0:0..10 CONSTRUCTOR visibility:public <> () returnType:.Test [primary] @0:0..10 BLOCK_BODY @0:0..10 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @@ -12,3 +11,4 @@ @0:0..10 VALUE_PARAMETER name: type:kotlin.Any @0:0..10 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @0:0..10 VALUE_PARAMETER name: type:kotlin.Any + @0:0..10 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test diff --git a/compiler/testData/ir/sourceRanges/declarations/kt29862.txt b/compiler/testData/ir/sourceRanges/declarations/kt29862.txt index 53bc240679e..45f334259ef 100644 --- a/compiler/testData/ir/sourceRanges/declarations/kt29862.txt +++ b/compiler/testData/ir/sourceRanges/declarations/kt29862.txt @@ -1,6 +1,5 @@ @0:0..15:0 FILE fqName: fileName:/kt29862.kt @0:0..3:1 CLASS CLASS name:Test1 modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - @0:0..3:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1 @0:9..3:1 CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.Test1 [primary] @1:4..14 VALUE_PARAMETER name:x index:0 type:kotlin.Int @0:0..3:1 BLOCK_BODY @@ -23,8 +22,8 @@ @0:0..3:1 VALUE_PARAMETER name: type:kotlin.Any @0:9..3:1 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @0:0..3:1 VALUE_PARAMETER name: type:kotlin.Any + @0:0..3:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1 @5:0..14:1 CLASS CLASS name:Test2 modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - @5:0..14:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2 @7:0..14:1 CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.Test2 [primary] @8:4..14 VALUE_PARAMETER name:x index:0 type:kotlin.Int @5:0..14:1 BLOCK_BODY @@ -41,7 +40,6 @@ @8:4..14 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null @8:4..14 GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null @10:4..13:5 CLASS CLASS name:TestInner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] - @10:4..13:5 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2.TestInner @11:4..13:5 CONSTRUCTOR visibility:public <> ($this:.Test2, x:kotlin.Int) returnType:.Test2.TestInner [primary] @11:19..13:5 VALUE_PARAMETER name: type:.Test2 @12:8..18 VALUE_PARAMETER name:x index:0 type:kotlin.Int @@ -65,6 +63,7 @@ @10:4..13:5 VALUE_PARAMETER name: type:kotlin.Any @11:4..13:5 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @10:4..13:5 VALUE_PARAMETER name: type:kotlin.Any + @10:4..13:5 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2.TestInner @7:0..14:1 FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] @5:0..14:1 VALUE_PARAMETER name: type:kotlin.Any @7:0..14:1 VALUE_PARAMETER name:other index:0 type:kotlin.Any? @@ -72,3 +71,4 @@ @5:0..14:1 VALUE_PARAMETER name: type:kotlin.Any @7:0..14:1 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @5:0..14:1 VALUE_PARAMETER name: type:kotlin.Any + @5:0..14:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2 diff --git a/compiler/testData/ir/sourceRanges/declarations/primaryConstructors.txt b/compiler/testData/ir/sourceRanges/declarations/primaryConstructors.txt index e955b9ef1db..c4b4358d24b 100644 --- a/compiler/testData/ir/sourceRanges/declarations/primaryConstructors.txt +++ b/compiler/testData/ir/sourceRanges/declarations/primaryConstructors.txt @@ -1,6 +1,5 @@ @0:0..13:23 FILE fqName: fileName:/primaryConstructors.kt @0:0..23 CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[kotlin.Any] - @0:0..23 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1 @0:0..23 CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.Test1 [primary] @0:12..22 VALUE_PARAMETER name:x index:0 type:kotlin.Int @0:0..23 BLOCK_BODY @@ -23,8 +22,8 @@ @0:0..23 VALUE_PARAMETER name: type:kotlin.Any @0:0..23 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @0:0..23 VALUE_PARAMETER name: type:kotlin.Any + @0:0..23 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1 @2:0..3:32 CLASS CLASS name:Test2 modality:FINAL visibility:public superTypes:[kotlin.Any] - @2:0..3:32 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2 @3:9..32 CONSTRUCTOR visibility:internal <> (x:kotlin.Int) returnType:.Test2 [primary] @3:21..31 VALUE_PARAMETER name:x index:0 type:kotlin.Int @2:0..3:32 BLOCK_BODY @@ -47,8 +46,8 @@ @2:0..3:32 VALUE_PARAMETER name: type:kotlin.Any @2:0..3:32 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @2:0..3:32 VALUE_PARAMETER name: type:kotlin.Any + @2:0..3:32 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2 @5:0..9:23 CLASS CLASS name:Test3 modality:FINAL visibility:public superTypes:[kotlin.Any] - @5:0..9:23 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test3 @9:0..23 CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.Test3 [primary] @9:12..22 VALUE_PARAMETER name:x index:0 type:kotlin.Int @5:0..9:23 BLOCK_BODY @@ -71,8 +70,8 @@ @5:0..9:23 VALUE_PARAMETER name: type:kotlin.Any @5:0..9:23 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @5:0..9:23 VALUE_PARAMETER name: type:kotlin.Any + @5:0..9:23 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test3 @11:0..13:23 CLASS CLASS name:Test4 modality:FINAL visibility:public superTypes:[kotlin.Any] - @11:0..13:23 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test4 @13:0..23 CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.Test4 [primary] @13:12..22 VALUE_PARAMETER name:x index:0 type:kotlin.Int @11:0..13:23 BLOCK_BODY @@ -95,3 +94,4 @@ @11:0..13:23 VALUE_PARAMETER name: type:kotlin.Any @11:0..13:23 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @11:0..13:23 VALUE_PARAMETER name: type:kotlin.Any + @11:0..13:23 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test4 diff --git a/compiler/testData/ir/sourceRanges/declarations/secondaryConstructors.txt b/compiler/testData/ir/sourceRanges/declarations/secondaryConstructors.txt index e5dbe40c57b..b96466e780f 100644 --- a/compiler/testData/ir/sourceRanges/declarations/secondaryConstructors.txt +++ b/compiler/testData/ir/sourceRanges/declarations/secondaryConstructors.txt @@ -1,6 +1,5 @@ @0:0..13:1 FILE fqName: fileName:/secondaryConstructors.kt @0:0..13:1 CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any] - @0:0..13:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.C @1:4..27 CONSTRUCTOR visibility:public <> () returnType:.C @1:4..27 BLOCK_BODY @1:20..27 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @@ -27,3 +26,4 @@ @0:0..13:1 VALUE_PARAMETER name: type:kotlin.Any @0:0..13:1 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @0:0..13:1 VALUE_PARAMETER name: type:kotlin.Any + @0:0..13:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.C diff --git a/compiler/testData/ir/sourceRanges/declarations/synthesizedDataClassMembers.txt b/compiler/testData/ir/sourceRanges/declarations/synthesizedDataClassMembers.txt index 2eb348c38ef..ede9b58250e 100644 --- a/compiler/testData/ir/sourceRanges/declarations/synthesizedDataClassMembers.txt +++ b/compiler/testData/ir/sourceRanges/declarations/synthesizedDataClassMembers.txt @@ -1,6 +1,5 @@ @0:0..4:1 FILE fqName: fileName:/synthesizedDataClassMembers.kt @0:0..4:1 CLASS CLASS name:C modality:FINAL visibility:public [data] superTypes:[kotlin.Any] - @0:0..4:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.C @0:5..4:1 CONSTRUCTOR visibility:public <> (x:kotlin.Int, y:kotlin.String, z:kotlin.Any) returnType:.C [primary] @1:8..18 VALUE_PARAMETER name:x index:0 type:kotlin.Int @2:8..21 VALUE_PARAMETER name:y index:1 type:kotlin.String @@ -171,3 +170,4 @@ @-1:-1..-1 CONST Boolean type=kotlin.Boolean value=false @-1:-1..-1 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in .C' @-1:-1..-1 CONST Boolean type=kotlin.Boolean value=true + @0:0..4:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.C diff --git a/compiler/testData/ir/sourceRanges/kt17108.txt b/compiler/testData/ir/sourceRanges/kt17108.txt index 13bf7e8f347..079149261d0 100644 --- a/compiler/testData/ir/sourceRanges/kt17108.txt +++ b/compiler/testData/ir/sourceRanges/kt17108.txt @@ -1,6 +1,5 @@ @0:0..26:1 FILE fqName: fileName:/kt17108.kt @4:0..26:1 CLASS INTERFACE name:Boolean modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - @4:0..26:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Boolean @8:20..38 FUN name:not visibility:public modality:ABSTRACT <> ($this:.Boolean) returnType:.Boolean [operator] @8:4..38 VALUE_PARAMETER name: type:.Boolean @13:10..42 FUN name:and visibility:public modality:ABSTRACT <> ($this:.Boolean, other:.Boolean) returnType:.Boolean [infix] @@ -22,3 +21,4 @@ @4:0..26:1 VALUE_PARAMETER name: type:kotlin.Any @4:7..26:1 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] @4:0..26:1 VALUE_PARAMETER name: type:kotlin.Any + @4:0..26:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Boolean