From 356e42196ce46d5b74a92ee3187d3dfb8a4f7aee Mon Sep 17 00:00:00 2001 From: "simon.ogorodnik" Date: Tue, 7 Apr 2020 01:22:04 +0300 Subject: [PATCH] [FIR2IR] Fix inner class constructor receiver parameter type --- .../fir/backend/Fir2IrDeclarationStorage.kt | 10 +- .../innerClassConstructorWithTwoReceivers.kt | 1 - .../ir/irText/classes/initBlock.fir.txt | 153 ------------------ .../testData/ir/irText/classes/initBlock.kt | 1 + .../ir/irText/classes/innerClass.fir.txt | 8 +- ...nnerClassWithDelegatingConstructor.fir.txt | 8 +- .../classes/objectLiteralExpressions.fir.txt | 4 +- .../irText/classes/outerClassAccess.fir.txt | 81 ---------- .../ir/irText/classes/outerClassAccess.kt | 1 + .../declarations/parameters/class.fir.txt | 94 ----------- .../irText/declarations/parameters/class.kt | 1 + .../parameters/constructor.fir.txt | 8 +- .../parameters/genericInnerClass.fir.txt | 47 ------ .../parameters/genericInnerClass.kt | 1 + .../boundInnerGenericConstructor.fir.txt | 4 +- .../constructorWithAdaptedArguments.fir.txt | 4 +- ...nstructorWithOwnTypeParametersCall.fir.txt | 4 +- .../ir/irText/expressions/kt16905.fir.txt | 12 +- .../ir/irText/expressions/kt30020.fir.txt | 4 +- .../multipleThisReferences.fir.txt | 4 +- .../outerClassInstanceReference.fir.txt | 49 ------ .../outerClassInstanceReference.kt | 1 + ...versionInGenericConstructorCall_NI.fir.txt | 4 +- .../thisOfGenericOuterClass.fir.txt | 8 +- .../ir/irText/singletons/enumEntry.fir.txt | 4 +- .../smartCastOnReceiverOfGenericType.fir.txt | 4 +- 26 files changed, 49 insertions(+), 471 deletions(-) delete mode 100644 compiler/testData/ir/irText/classes/initBlock.fir.txt delete mode 100644 compiler/testData/ir/irText/classes/outerClassAccess.fir.txt delete mode 100644 compiler/testData/ir/irText/declarations/parameters/class.fir.txt delete mode 100644 compiler/testData/ir/irText/declarations/parameters/genericInnerClass.fir.txt delete mode 100644 compiler/testData/ir/irText/expressions/outerClassInstanceReference.fir.txt diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt index 0ef5b81ba75..57ebe380f0b 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt @@ -37,10 +37,7 @@ import org.jetbrains.kotlin.ir.symbols.* import org.jetbrains.kotlin.ir.types.IrErrorType import org.jetbrains.kotlin.ir.types.IrSimpleType import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.ir.util.constructors -import org.jetbrains.kotlin.ir.util.functions -import org.jetbrains.kotlin.ir.util.isInterface -import org.jetbrains.kotlin.ir.util.properties +import org.jetbrains.kotlin.ir.util.* import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name @@ -356,10 +353,11 @@ class Fir2IrDeclarationStorage( } } else { // Set dispatch receiver parameter for inner class's constructor. - if (containingClass?.isInner == true) { + val outerClass = containingClass?.parentClassOrNull + if (containingClass?.isInner == true && outerClass != null) { dispatchReceiverParameter = declareThisReceiverParameter( symbolTable, - thisType = containingClass.thisReceiver!!.type, + thisType = outerClass.thisReceiver!!.type, thisOrigin = thisOrigin ) } diff --git a/compiler/testData/codegen/box/callableReference/function/innerClassConstructorWithTwoReceivers.kt b/compiler/testData/codegen/box/callableReference/function/innerClassConstructorWithTwoReceivers.kt index 3dccb4671a0..35fa6ffc598 100644 --- a/compiler/testData/codegen/box/callableReference/function/innerClassConstructorWithTwoReceivers.kt +++ b/compiler/testData/codegen/box/callableReference/function/innerClassConstructorWithTwoReceivers.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR abstract class A { inner class InnerInA { fun returnOk() = "OK" diff --git a/compiler/testData/ir/irText/classes/initBlock.fir.txt b/compiler/testData/ir/irText/classes/initBlock.fir.txt deleted file mode 100644 index 4de6914be1b..00000000000 --- a/compiler/testData/ir/irText/classes/initBlock.fir.txt +++ /dev/null @@ -1,153 +0,0 @@ -FILE fqName: fileName:/initBlock.kt - CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1 - CONSTRUCTOR visibility:public <> () returnType:.Test1 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[kotlin.Any]' - ANONYMOUS_INITIALIZER isStatic=false - BLOCK_BODY - CALL 'public final fun println (): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:Test2 modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2 - CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.Test2 [primary] - VALUE_PARAMETER name:x index:0 type:kotlin.Int - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test2 modality:FINAL visibility:public superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final] - EXPRESSION_BODY - GET_VAR 'x: kotlin.Int declared in .Test2.' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test2) returnType:kotlin.Int - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test2 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .Test2' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null - ANONYMOUS_INITIALIZER isStatic=false - BLOCK_BODY - CALL 'public final fun println (): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:Test3 modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test3 - ANONYMOUS_INITIALIZER isStatic=false - BLOCK_BODY - CALL 'public final fun println (): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null - CONSTRUCTOR visibility:public <> () returnType:.Test3 - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test3 modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:Test4 modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test4 - ANONYMOUS_INITIALIZER isStatic=false - BLOCK_BODY - CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value="1" - CONSTRUCTOR visibility:public <> () returnType:.Test4 - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test4 modality:FINAL visibility:public superTypes:[kotlin.Any]' - ANONYMOUS_INITIALIZER isStatic=false - BLOCK_BODY - CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value="2" - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:Test5 modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test5 - CONSTRUCTOR visibility:public <> () returnType:.Test5 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test5 modality:FINAL visibility:public superTypes:[kotlin.Any]' - ANONYMOUS_INITIALIZER isStatic=false - BLOCK_BODY - CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value="1" - CLASS CLASS name:TestInner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test5.TestInner - CONSTRUCTOR visibility:public <> ($this:.Test5.TestInner) returnType:.Test5.TestInner [primary] - $outer: VALUE_PARAMETER name: type:.Test5.TestInner - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestInner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' - ANONYMOUS_INITIALIZER isStatic=false - BLOCK_BODY - CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value="2" - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/classes/initBlock.kt b/compiler/testData/ir/irText/classes/initBlock.kt index 81f686caf0a..9f94c3d27f7 100644 --- a/compiler/testData/ir/irText/classes/initBlock.kt +++ b/compiler/testData/ir/irText/classes/initBlock.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // WITH_RUNTIME class Test1 { diff --git a/compiler/testData/ir/irText/classes/innerClass.fir.txt b/compiler/testData/ir/irText/classes/innerClass.fir.txt index 107a1840596..4a840e1669b 100644 --- a/compiler/testData/ir/irText/classes/innerClass.fir.txt +++ b/compiler/testData/ir/irText/classes/innerClass.fir.txt @@ -7,8 +7,8 @@ FILE fqName: fileName:/innerClass.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]' CLASS CLASS name:TestInnerClass modality:OPEN visibility:public [inner] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.TestInnerClass - CONSTRUCTOR visibility:public <> ($this:.Outer.TestInnerClass) returnType:.Outer.TestInnerClass [primary] - $outer: VALUE_PARAMETER name: type:.Outer.TestInnerClass + CONSTRUCTOR visibility:public <> ($this:.Outer) returnType:.Outer.TestInnerClass [primary] + $outer: VALUE_PARAMETER name: type:.Outer BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestInnerClass modality:OPEN visibility:public [inner] superTypes:[kotlin.Any]' @@ -27,8 +27,8 @@ FILE fqName: fileName:/innerClass.kt $this: VALUE_PARAMETER name: type:kotlin.Any CLASS CLASS name:DerivedInnerClass modality:FINAL visibility:public [inner] superTypes:[.Outer.TestInnerClass] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.DerivedInnerClass - CONSTRUCTOR visibility:public <> ($this:.Outer.DerivedInnerClass) returnType:.Outer.DerivedInnerClass [primary] - $outer: VALUE_PARAMETER name: type:.Outer.DerivedInnerClass + CONSTRUCTOR visibility:public <> ($this:.Outer) returnType:.Outer.DerivedInnerClass [primary] + $outer: VALUE_PARAMETER name: type:.Outer BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Outer.TestInnerClass' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DerivedInnerClass modality:FINAL visibility:public [inner] superTypes:[.Outer.TestInnerClass]' diff --git a/compiler/testData/ir/irText/classes/innerClassWithDelegatingConstructor.fir.txt b/compiler/testData/ir/irText/classes/innerClassWithDelegatingConstructor.fir.txt index 5507ea56d69..834f8892b15 100644 --- a/compiler/testData/ir/irText/classes/innerClassWithDelegatingConstructor.fir.txt +++ b/compiler/testData/ir/irText/classes/innerClassWithDelegatingConstructor.fir.txt @@ -7,8 +7,8 @@ FILE fqName: fileName:/innerClassWithDelegatingConstructor.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]' CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner - CONSTRUCTOR visibility:public <> ($this:.Outer.Inner, x:kotlin.Int) returnType:.Outer.Inner [primary] - $outer: VALUE_PARAMETER name: type:.Outer.Inner + CONSTRUCTOR visibility:public <> ($this:.Outer, x:kotlin.Int) returnType:.Outer.Inner [primary] + $outer: VALUE_PARAMETER name: type:.Outer VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @@ -24,8 +24,8 @@ FILE fqName: fileName:/innerClassWithDelegatingConstructor.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .Outer.Inner' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null receiver: GET_VAR ': .Outer.Inner declared in .Outer.Inner.' type=.Outer.Inner origin=null - CONSTRUCTOR visibility:public <> ($this:.Outer.Inner) returnType:.Outer.Inner - $outer: VALUE_PARAMETER name: type:.Outer.Inner + CONSTRUCTOR visibility:public <> ($this:.Outer) returnType:.Outer.Inner + $outer: VALUE_PARAMETER name: type:.Outer BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (x: kotlin.Int) [primary] declared in .Outer.Inner' x: CONST Int type=kotlin.Int value=0 diff --git a/compiler/testData/ir/irText/classes/objectLiteralExpressions.fir.txt b/compiler/testData/ir/irText/classes/objectLiteralExpressions.fir.txt index 462483bac66..cb369b84574 100644 --- a/compiler/testData/ir/irText/classes/objectLiteralExpressions.fir.txt +++ b/compiler/testData/ir/irText/classes/objectLiteralExpressions.fir.txt @@ -87,8 +87,8 @@ FILE fqName: fileName:/objectLiteralExpressions.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]' CLASS CLASS name:Inner modality:ABSTRACT visibility:public [inner] superTypes:[.IFoo] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner - CONSTRUCTOR visibility:public <> ($this:.Outer.Inner) returnType:.Outer.Inner [primary] - $outer: VALUE_PARAMETER name: type:.Outer.Inner + CONSTRUCTOR visibility:public <> ($this:.Outer) returnType:.Outer.Inner [primary] + $outer: VALUE_PARAMETER name: type:.Outer BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:ABSTRACT visibility:public [inner] superTypes:[.IFoo]' diff --git a/compiler/testData/ir/irText/classes/outerClassAccess.fir.txt b/compiler/testData/ir/irText/classes/outerClassAccess.fir.txt deleted file mode 100644 index d0bb1fe572f..00000000000 --- a/compiler/testData/ir/irText/classes/outerClassAccess.fir.txt +++ /dev/null @@ -1,81 +0,0 @@ -FILE fqName: fileName:/outerClassAccess.kt - CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer - CONSTRUCTOR visibility:public <> () returnType:.Outer [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN name:foo visibility:public modality:FINAL <> ($this:.Outer) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.Outer - BLOCK_BODY - CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner - CONSTRUCTOR visibility:public <> ($this:.Outer.Inner) returnType:.Outer.Inner [primary] - $outer: VALUE_PARAMETER name: type:.Outer.Inner - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' - FUN name:test visibility:public modality:FINAL <> ($this:.Outer.Inner) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.Outer.Inner - BLOCK_BODY - CALL 'public final fun foo (): kotlin.Unit declared in .Outer' type=kotlin.Unit origin=null - $this: GET_VAR ': .Outer declared in .Outer' type=.Outer origin=null - CLASS CLASS name:Inner2 modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner.Inner2 - CONSTRUCTOR visibility:public <> ($this:.Outer.Inner.Inner2) returnType:.Outer.Inner.Inner2 [primary] - $outer: VALUE_PARAMETER name: type:.Outer.Inner.Inner2 - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner2 modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' - FUN name:test2 visibility:public modality:FINAL <> ($this:.Outer.Inner.Inner2) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.Outer.Inner.Inner2 - BLOCK_BODY - CALL 'public final fun test (): kotlin.Unit declared in .Outer.Inner' type=kotlin.Unit origin=null - $this: GET_VAR ': .Outer.Inner declared in .Outer.Inner' type=.Outer.Inner origin=null - CALL 'public final fun foo (): kotlin.Unit declared in .Outer' type=kotlin.Unit origin=null - $this: GET_VAR ': .Outer declared in .Outer' type=.Outer origin=null - FUN name:test3 visibility:public modality:FINAL <> ($this:.Outer.Inner.Inner2, $receiver:.Outer) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.Outer.Inner.Inner2 - $receiver: VALUE_PARAMETER name: type:.Outer - BLOCK_BODY - CALL 'public final fun foo (): kotlin.Unit declared in .Outer' type=kotlin.Unit origin=null - $this: GET_VAR ': .Outer declared in .Outer.Inner.Inner2.test3' type=.Outer origin=null - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/classes/outerClassAccess.kt b/compiler/testData/ir/irText/classes/outerClassAccess.kt index 605d2f315f3..1f684135a82 100644 --- a/compiler/testData/ir/irText/classes/outerClassAccess.kt +++ b/compiler/testData/ir/irText/classes/outerClassAccess.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL class Outer { fun foo() {} diff --git a/compiler/testData/ir/irText/declarations/parameters/class.fir.txt b/compiler/testData/ir/irText/declarations/parameters/class.fir.txt deleted file mode 100644 index 5bbe28a39f1..00000000000 --- a/compiler/testData/ir/irText/declarations/parameters/class.fir.txt +++ /dev/null @@ -1,94 +0,0 @@ -FILE fqName: fileName:/class.kt - CLASS INTERFACE name:TestInterface modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestInterface.TestInterface> - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - CLASS INTERFACE name:TestNestedInterface modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestInterface.TestNestedInterface.TestInterface.TestNestedInterface> - TYPE_PARAMETER name:TT index:0 variance: superTypes:[kotlin.Any?] - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:Test modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test.Test> - TYPE_PARAMETER name:T0 index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> () returnType:.Test.Test> [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test modality:FINAL visibility:public superTypes:[kotlin.Any]' - CLASS CLASS name:TestNested modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test.TestNested.Test.TestNested> - TYPE_PARAMETER name:T1 index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> () returnType:.Test.TestNested.Test.TestNested> [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestNested modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:TestInner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test.TestInner.Test.TestInner, T0 of .Test> - TYPE_PARAMETER name:T2 index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> ($this:.Test.TestInner.Test.TestInner, T0 of .Test>) returnType:.Test.TestInner.Test.TestInner, T0 of .Test> [primary] - $outer: VALUE_PARAMETER name: type:.Test.TestInner.Test.TestInner, T0 of .Test> - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestInner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/declarations/parameters/class.kt b/compiler/testData/ir/irText/declarations/parameters/class.kt index ab6dcbd0976..27fbdecdda8 100644 --- a/compiler/testData/ir/irText/declarations/parameters/class.kt +++ b/compiler/testData/ir/irText/declarations/parameters/class.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL interface TestInterface { interface TestNestedInterface } diff --git a/compiler/testData/ir/irText/declarations/parameters/constructor.fir.txt b/compiler/testData/ir/irText/declarations/parameters/constructor.fir.txt index f038d1025dc..0dca618643b 100644 --- a/compiler/testData/ir/irText/declarations/parameters/constructor.fir.txt +++ b/compiler/testData/ir/irText/declarations/parameters/constructor.fir.txt @@ -66,8 +66,8 @@ FILE fqName: fileName:/constructor.kt CLASS CLASS name:TestInner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2.TestInner.Test2.TestInner> TYPE_PARAMETER name:Z index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> ($this:.Test2.TestInner.Test2.TestInner>, z:Z of .Test2.TestInner) returnType:.Test2.TestInner.Test2.TestInner> [primary] - $outer: VALUE_PARAMETER name: type:.Test2.TestInner.Test2.TestInner> + CONSTRUCTOR visibility:public <> ($this:.Test2, z:Z of .Test2.TestInner) returnType:.Test2.TestInner.Test2.TestInner> [primary] + $outer: VALUE_PARAMETER name: type:.Test2 VALUE_PARAMETER name:z index:0 type:Z of .Test2.TestInner BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @@ -83,8 +83,8 @@ FILE fqName: fileName:/constructor.kt RETURN type=kotlin.Nothing from='public final fun (): Z of .Test2.TestInner declared in .Test2.TestInner' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:Z of .Test2.TestInner visibility:private [final]' type=Z of .Test2.TestInner origin=null receiver: GET_VAR ': .Test2.TestInner.Test2.TestInner> declared in .Test2.TestInner.' type=.Test2.TestInner.Test2.TestInner> origin=null - CONSTRUCTOR visibility:public <> ($this:.Test2.TestInner.Test2.TestInner>, z:Z of .Test2.TestInner, i:kotlin.Int) returnType:.Test2.TestInner.Test2.TestInner> - $outer: VALUE_PARAMETER name: type:.Test2.TestInner.Test2.TestInner> + CONSTRUCTOR visibility:public <> ($this:.Test2, z:Z of .Test2.TestInner, i:kotlin.Int) returnType:.Test2.TestInner.Test2.TestInner> + $outer: VALUE_PARAMETER name: type:.Test2 VALUE_PARAMETER name:z index:0 type:Z of .Test2.TestInner VALUE_PARAMETER name:i index:1 type:kotlin.Int BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.fir.txt b/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.fir.txt deleted file mode 100644 index a525538afee..00000000000 --- a/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.fir.txt +++ /dev/null @@ -1,47 +0,0 @@ -FILE fqName: fileName:/genericInnerClass.kt - CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Outer> - TYPE_PARAMETER name:T1 index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> () returnType:.Outer.Outer> [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]' - CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner.Outer.Inner, T1 of .Outer> - TYPE_PARAMETER name:T2 index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> ($this:.Outer.Inner.Outer.Inner, T1 of .Outer>) returnType:.Outer.Inner.Outer.Inner, T1 of .Outer> [primary] - $outer: VALUE_PARAMETER name: type:.Outer.Inner.Outer.Inner, T1 of .Outer> - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' - FUN name:foo visibility:public modality:FINAL <> ($this:.Outer.Inner.Outer.Inner, T1 of .Outer>, x1:T1 of .Outer, x2:T2 of .Outer.Inner) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.Outer.Inner.Outer.Inner, T1 of .Outer> - VALUE_PARAMETER name:x1 index:0 type:T1 of .Outer - VALUE_PARAMETER name:x2 index:1 type:T2 of .Outer.Inner - BLOCK_BODY - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.kt b/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.kt index 9860890d26d..2ba367df453 100644 --- a/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.kt +++ b/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL class Outer { inner class Inner { fun foo(x1: T1, x2: T2) {} diff --git a/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.fir.txt b/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.fir.txt index a4cf1bd281a..f318c04215a 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.fir.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.fir.txt @@ -9,8 +9,8 @@ FILE fqName:test fileName:/boundInnerGenericConstructor.kt CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:test.Foo.Inner

TYPE_PARAMETER name:P index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> ($this:test.Foo.Inner

, a:T of test.Foo, b:P of test.Foo.Inner) returnType:test.Foo.Inner

[primary] - $outer: VALUE_PARAMETER name: type:test.Foo.Inner

+ CONSTRUCTOR visibility:public <> ($this:test.Foo, a:T of test.Foo, b:P of test.Foo.Inner) returnType:test.Foo.Inner

[primary] + $outer: VALUE_PARAMETER name: type:test.Foo VALUE_PARAMETER name:a index:0 type:T of test.Foo VALUE_PARAMETER name:b index:1 type:P of test.Foo.Inner BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.fir.txt b/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.fir.txt index 5faffd177d3..6a3247c9adc 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.fir.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.fir.txt @@ -34,8 +34,8 @@ FILE fqName: fileName:/constructorWithAdaptedArguments.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]' CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner - CONSTRUCTOR visibility:public <> ($this:.Outer.Inner, xs:kotlin.IntArray) returnType:.Outer.Inner [primary] - $outer: VALUE_PARAMETER name: type:.Outer.Inner + CONSTRUCTOR visibility:public <> ($this:.Outer, xs:kotlin.IntArray) returnType:.Outer.Inner [primary] + $outer: VALUE_PARAMETER name: type:.Outer VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' diff --git a/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt index c8e380d909e..c83664b958c 100644 --- a/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt +++ b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt @@ -20,8 +20,8 @@ FILE fqName: fileName:/constructorWithOwnTypeParametersCall.kt CLASS CLASS name:K2 modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.K1.K2.K1.K2, T1 of .K1> TYPE_PARAMETER name:T2 index:0 variance: superTypes:[kotlin.CharSequence] - CONSTRUCTOR visibility:public <> ($this:.K1.K2.K1.K2, T1 of .K1>) returnType:.K1.K2.K1.K2, T1 of .K1> [primary] - $outer: VALUE_PARAMETER name: type:.K1.K2.K1.K2, T1 of .K1> + CONSTRUCTOR visibility:public <> ($this:.K1.K1>) returnType:.K1.K2.K1.K2, T1 of .K1> [primary] + $outer: VALUE_PARAMETER name: type:.K1.K1> BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:K2 modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' diff --git a/compiler/testData/ir/irText/expressions/kt16905.fir.txt b/compiler/testData/ir/irText/expressions/kt16905.fir.txt index c1a9291d413..75f7cf2ee6a 100644 --- a/compiler/testData/ir/irText/expressions/kt16905.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt16905.fir.txt @@ -7,8 +7,8 @@ FILE fqName: fileName:/kt16905.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]' CLASS CLASS name:Inner modality:OPEN visibility:public [inner] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner - CONSTRUCTOR visibility:public <> ($this:.Outer.Inner) returnType:.Outer.Inner [primary] - $outer: VALUE_PARAMETER name: type:.Outer.Inner + CONSTRUCTOR visibility:public <> ($this:.Outer) returnType:.Outer.Inner [primary] + $outer: VALUE_PARAMETER name: type:.Outer BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:OPEN visibility:public [inner] superTypes:[kotlin.Any]' @@ -27,8 +27,8 @@ FILE fqName: fileName:/kt16905.kt $this: VALUE_PARAMETER name: type:kotlin.Any CLASS CLASS name:InnerDerived0 modality:FINAL visibility:public [inner] superTypes:[.Outer.Inner] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.InnerDerived0 - CONSTRUCTOR visibility:public <> ($this:.Outer.InnerDerived0) returnType:.Outer.InnerDerived0 [primary] - $outer: VALUE_PARAMETER name: type:.Outer.InnerDerived0 + CONSTRUCTOR visibility:public <> ($this:.Outer) returnType:.Outer.InnerDerived0 [primary] + $outer: VALUE_PARAMETER name: type:.Outer BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Outer.Inner' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:InnerDerived0 modality:FINAL visibility:public [inner] superTypes:[.Outer.Inner]' @@ -47,8 +47,8 @@ FILE fqName: fileName:/kt16905.kt $this: VALUE_PARAMETER name: type:kotlin.Any CLASS CLASS name:InnerDerived1 modality:FINAL visibility:public [inner] superTypes:[.Outer.Inner] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.InnerDerived1 - CONSTRUCTOR visibility:public <> ($this:.Outer.InnerDerived1) returnType:.Outer.InnerDerived1 [primary] - $outer: VALUE_PARAMETER name: type:.Outer.InnerDerived1 + CONSTRUCTOR visibility:public <> ($this:.Outer) returnType:.Outer.InnerDerived1 [primary] + $outer: VALUE_PARAMETER name: type:.Outer BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Outer.Inner' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:InnerDerived1 modality:FINAL visibility:public [inner] superTypes:[.Outer.Inner]' diff --git a/compiler/testData/ir/irText/expressions/kt30020.fir.txt b/compiler/testData/ir/irText/expressions/kt30020.fir.txt index e5a097e3004..3ab0e673495 100644 --- a/compiler/testData/ir/irText/expressions/kt30020.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt30020.fir.txt @@ -104,8 +104,8 @@ FILE fqName: fileName:/kt30020.kt element: CONST Int type=kotlin.Int value=200 CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.AML.Inner - CONSTRUCTOR visibility:public <> ($this:.AML.Inner) returnType:.AML.Inner [primary] - $outer: VALUE_PARAMETER name: type:.AML.Inner + CONSTRUCTOR visibility:public <> ($this:.AML) returnType:.AML.Inner [primary] + $outer: VALUE_PARAMETER name: type:.AML BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' diff --git a/compiler/testData/ir/irText/expressions/multipleThisReferences.fir.txt b/compiler/testData/ir/irText/expressions/multipleThisReferences.fir.txt index 207c29928d4..5ab00c2bace 100644 --- a/compiler/testData/ir/irText/expressions/multipleThisReferences.fir.txt +++ b/compiler/testData/ir/irText/expressions/multipleThisReferences.fir.txt @@ -7,8 +7,8 @@ FILE fqName: fileName:/multipleThisReferences.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]' CLASS CLASS name:Inner modality:OPEN visibility:public [inner] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner - CONSTRUCTOR visibility:public <> ($this:.Outer.Inner, x:kotlin.Int) returnType:.Outer.Inner [primary] - $outer: VALUE_PARAMETER name: type:.Outer.Inner + CONSTRUCTOR visibility:public <> ($this:.Outer, x:kotlin.Int) returnType:.Outer.Inner [primary] + $outer: VALUE_PARAMETER name: type:.Outer VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' diff --git a/compiler/testData/ir/irText/expressions/outerClassInstanceReference.fir.txt b/compiler/testData/ir/irText/expressions/outerClassInstanceReference.fir.txt deleted file mode 100644 index 63832a8569d..00000000000 --- a/compiler/testData/ir/irText/expressions/outerClassInstanceReference.fir.txt +++ /dev/null @@ -1,49 +0,0 @@ -FILE fqName: fileName:/outerClassInstanceReference.kt - CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer - CONSTRUCTOR visibility:public <> () returnType:.Outer [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN name:outer visibility:public modality:FINAL <> ($this:.Outer) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.Outer - BLOCK_BODY - CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner - CONSTRUCTOR visibility:public <> ($this:.Outer.Inner) returnType:.Outer.Inner [primary] - $outer: VALUE_PARAMETER name: type:.Outer.Inner - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' - FUN name:inner visibility:public modality:FINAL <> ($this:.Outer.Inner) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.Outer.Inner - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun inner (): kotlin.Unit declared in .Outer.Inner' - CALL 'public final fun outer (): kotlin.Unit declared in .Outer' type=kotlin.Unit origin=null - $this: GET_VAR ': .Outer declared in .Outer' type=.Outer origin=null - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/expressions/outerClassInstanceReference.kt b/compiler/testData/ir/irText/expressions/outerClassInstanceReference.kt index 0365f7d9bd0..7924f7b6e18 100644 --- a/compiler/testData/ir/irText/expressions/outerClassInstanceReference.kt +++ b/compiler/testData/ir/irText/expressions/outerClassInstanceReference.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL class Outer { fun outer() {} diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.fir.txt b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.fir.txt index 0de1acb2464..098d533899d 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.fir.txt @@ -32,8 +32,8 @@ FILE fqName: fileName:/samConversionInGenericConstructorCall_NI.kt CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner.Outer.Inner, T1 of .Outer> TYPE_PARAMETER name:T2 index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> ($this:.Outer.Inner.Outer.Inner, T1 of .Outer>, j12:.J.Outer, T2 of .Outer.Inner>) returnType:.Outer.Inner.Outer.Inner, T1 of .Outer> [primary] - $outer: VALUE_PARAMETER name: type:.Outer.Inner.Outer.Inner, T1 of .Outer> + CONSTRUCTOR visibility:public <> ($this:.Outer.Outer>, j12:.J.Outer, T2 of .Outer.Inner>) returnType:.Outer.Inner.Outer.Inner, T1 of .Outer> [primary] + $outer: VALUE_PARAMETER name: type:.Outer.Outer> VALUE_PARAMETER name:j12 index:0 type:.J.Outer, T2 of .Outer.Inner> BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' diff --git a/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.fir.txt b/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.fir.txt index 6f22cae4063..11f81cb2058 100644 --- a/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.fir.txt +++ b/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.fir.txt @@ -20,8 +20,8 @@ FILE fqName: fileName:/thisOfGenericOuterClass.kt receiver: GET_VAR ': .Outer.Outer> declared in .Outer.' type=.Outer.Outer> origin=null CLASS CLASS name:Inner modality:OPEN visibility:public [inner] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner.Outer> - CONSTRUCTOR visibility:public <> ($this:.Outer.Inner.Outer>, y:kotlin.Int) returnType:.Outer.Inner.Outer> [primary] - $outer: VALUE_PARAMETER name: type:.Outer.Inner.Outer> + CONSTRUCTOR visibility:public <> ($this:.Outer.Outer>, y:kotlin.Int) returnType:.Outer.Inner.Outer> [primary] + $outer: VALUE_PARAMETER name: type:.Outer.Outer> VALUE_PARAMETER name:y index:0 type:kotlin.Int BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @@ -91,11 +91,11 @@ FILE fqName: fileName:/thisOfGenericOuterClass.kt GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:xx type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null receiver: GET_VAR ': .test. declared in .test..' type=.test. origin=null PROPERTY FAKE_OVERRIDE name:y visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.Outer.Inner) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.Outer.Inner.Outer>) returnType:kotlin.Int [fake_override] correspondingProperty: PROPERTY FAKE_OVERRIDE name:y visibility:public modality:FINAL [fake_override,val] overridden: public final fun (): kotlin.Int declared in .Outer.Inner - $this: VALUE_PARAMETER name: type:.Outer.Inner + $this: VALUE_PARAMETER name: type:.Outer.Inner.Outer> FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any diff --git a/compiler/testData/ir/irText/singletons/enumEntry.fir.txt b/compiler/testData/ir/irText/singletons/enumEntry.fir.txt index c6335455835..6abb64f3f73 100644 --- a/compiler/testData/ir/irText/singletons/enumEntry.fir.txt +++ b/compiler/testData/ir/irText/singletons/enumEntry.fir.txt @@ -20,8 +20,8 @@ FILE fqName: fileName:/enumEntry.kt BLOCK_BODY CLASS CLASS name:A modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Z.ENTRY.A - CONSTRUCTOR visibility:public <> ($this:.Z.ENTRY.A) returnType:IrErrorType [primary] - $outer: VALUE_PARAMETER name: type:.Z.ENTRY.A + CONSTRUCTOR visibility:public <> ($this:.Z.ENTRY) returnType:IrErrorType [primary] + $outer: VALUE_PARAMETER name: type:.Z.ENTRY BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' diff --git a/compiler/testData/ir/irText/types/smartCastOnReceiverOfGenericType.fir.txt b/compiler/testData/ir/irText/types/smartCastOnReceiverOfGenericType.fir.txt index 912929266fc..9b54f96f2b5 100644 --- a/compiler/testData/ir/irText/types/smartCastOnReceiverOfGenericType.fir.txt +++ b/compiler/testData/ir/irText/types/smartCastOnReceiverOfGenericType.fir.txt @@ -107,8 +107,8 @@ FILE fqName: fileName:/smartCastOnReceiverOfGenericType.kt CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner.Outer.Inner, T1 of .Outer> TYPE_PARAMETER name:T2 index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> ($this:.Outer.Inner.Outer.Inner, T1 of .Outer>) returnType:.Outer.Inner.Outer.Inner, T1 of .Outer> [primary] - $outer: VALUE_PARAMETER name: type:.Outer.Inner.Outer.Inner, T1 of .Outer> + CONSTRUCTOR visibility:public <> ($this:.Outer.Outer>) returnType:.Outer.Inner.Outer.Inner, T1 of .Outer> [primary] + $outer: VALUE_PARAMETER name: type:.Outer.Outer> BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]'