From 139557e6419b3a686efd9571bcc9a3a9629a2f22 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Thu, 16 May 2019 15:42:13 +0300 Subject: [PATCH] FIR2IR: support super-types & type parameters for external class --- .../fir/backend/Fir2IrDeclarationStorage.kt | 22 +++++- .../kotlin/fir/backend/Fir2IrVisitor.kt | 8 -- compiler/testData/cli/jvm/firHello.kt | 5 ++ .../ir/irText/classes/classes.fir.txt | 7 +- .../testData/ir/irText/classes/enum.fir.txt | 77 ++++++++++--------- .../irText/classes/enumClassModality.fir.txt | 49 +++++++----- .../classes/enumWithSecondaryCtor.fir.txt | 33 ++++---- .../classesWithAnnotations.fir.txt | 7 +- .../enumEntriesWithAnnotations.fir.txt | 7 +- .../enumsInAnnotationArguments.fir.txt | 7 +- .../multiplatform/expectedEnumClass.fir.txt | 14 ++-- ...nstructorWithOwnTypeParametersCall.fir.txt | 1 + .../expressions/enumEntryAsReceiver.fir.txt | 7 +- ...umEntryReferenceFromEnumEntryClass.fir.txt | 7 +- ...icConstructorCallWithTypeArguments.fir.txt | 9 ++- .../ir/irText/expressions/kt30020.fir.txt | 30 ++++---- .../expressions/objectAsCallable.fir.txt | 7 +- .../temporaryInEnumEntryInitializer.fir.txt | 13 ++-- .../ir/irText/expressions/values.fir.txt | 7 +- .../ir/irText/singletons/enumEntry.fir.txt | 7 +- .../ir/irText/stubs/builtinMap.fir.txt | 4 +- .../javaConstructorWithTypeParameters.fir.txt | 4 +- 22 files changed, 189 insertions(+), 143 deletions(-) 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 ecee8fc3586..109813e3be8 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 @@ -16,6 +16,7 @@ import org.jetbrains.kotlin.fir.descriptors.FirPackageFragmentDescriptor import org.jetbrains.kotlin.fir.expressions.FirVariable import org.jetbrains.kotlin.fir.render import org.jetbrains.kotlin.fir.resolve.FirSymbolProvider +import org.jetbrains.kotlin.fir.resolve.getOrPut import org.jetbrains.kotlin.fir.service import org.jetbrains.kotlin.fir.symbols.impl.* import org.jetbrains.kotlin.ir.declarations.* @@ -96,6 +97,20 @@ class Fir2IrDeclarationStorage( leaveScope(descriptor) } + private fun IrClass.declareSupertypesAndTypeParameters(klass: FirClass): IrClass { + for (superTypeRef in klass.superTypeRefs) { + superTypes += superTypeRef.toIrType(session, this@Fir2IrDeclarationStorage) + } + if (klass is FirRegularClass) { + for ((index, typeParameter) in klass.typeParameters.withIndex()) { + typeParameters += getIrTypeParameter(typeParameter, index).apply { + parent = this@declareSupertypesAndTypeParameters + } + } + } + return this + } + fun getIrClass(regularClass: FirRegularClass, setParent: Boolean = true): IrClass { fun create(): IrClass { val descriptor = WrappedClassDescriptor() @@ -136,9 +151,12 @@ class Fir2IrDeclarationStorage( if (cached != null) return cached val created = create() localStorage.putLocalClass(regularClass, created) + created.declareSupertypesAndTypeParameters(regularClass) return created } - return classCache.getOrPut(regularClass, ::create) + return classCache.getOrPut(regularClass, { create() }) { + it.declareSupertypesAndTypeParameters(regularClass) + } } fun getIrAnonymousObject(anonymousObject: FirAnonymousObject): IrClass { @@ -157,7 +175,7 @@ class Fir2IrDeclarationStorage( declareThisReceiver() } } - } + }.declareSupertypesAndTypeParameters(anonymousObject) } fun getIrTypeParameter(typeParameter: FirTypeParameter, index: Int = 0): IrTypeParameter { diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt index 87000c7d0cb..6b13e78b264 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt @@ -234,14 +234,6 @@ internal class Fir2IrVisitor( } private fun IrClass.setClassContent(klass: FirClass) { - for (superTypeRef in klass.superTypeRefs) { - superTypes += superTypeRef.toIrType(session, declarationStorage) - } - if (klass is FirRegularClass) { - for ((index, typeParameter) in klass.typeParameters.withIndex()) { - typeParameters += declarationStorage.getIrTypeParameter(typeParameter, index).setParentByParentStack() - } - } declarationStorage.enterScope(descriptor) val primaryConstructor = klass.getPrimaryConstructorIfAny() val irPrimaryConstructor = primaryConstructor?.accept(this@Fir2IrVisitor, null) as IrConstructor? diff --git a/compiler/testData/cli/jvm/firHello.kt b/compiler/testData/cli/jvm/firHello.kt index 611f0db20d6..a8966f22436 100644 --- a/compiler/testData/cli/jvm/firHello.kt +++ b/compiler/testData/cli/jvm/firHello.kt @@ -5,8 +5,13 @@ class E(s: String) : Exception(s) { } +fun testEmpty(ss: List) { + for (s in ss); +} + fun main(args: Array) { if (box() == "OK") { + System.out.println("Hello") println("Hello") throw E("Hello") } diff --git a/compiler/testData/ir/irText/classes/classes.fir.txt b/compiler/testData/ir/irText/classes/classes.fir.txt index 7919ff0619b..1a242e43127 100644 --- a/compiler/testData/ir/irText/classes/classes.fir.txt +++ b/compiler/testData/ir/irText/classes/classes.fir.txt @@ -73,16 +73,17 @@ FILE fqName: fileName:/classes.kt CONSTRUCTOR visibility:private <> () returnType:.TestEnumClass [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnumClass modality:FINAL visibility:public superTypes:[kotlin.Enum]' FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum diff --git a/compiler/testData/ir/irText/classes/enum.fir.txt b/compiler/testData/ir/irText/classes/enum.fir.txt index c66d53da8d7..3e9bff72f7d 100644 --- a/compiler/testData/ir/irText/classes/enum.fir.txt +++ b/compiler/testData/ir/irText/classes/enum.fir.txt @@ -4,6 +4,7 @@ FILE fqName: fileName:/enum.kt CONSTRUCTOR visibility:private <> () returnType:.TestEnum1 [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnum1 modality:FINAL visibility:public superTypes:[kotlin.Enum]' CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum1.TEST1 @@ -47,11 +48,11 @@ FILE fqName: fileName:/enum.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -71,6 +72,7 @@ FILE fqName: fileName:/enum.kt VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnum2 modality:FINAL visibility:public superTypes:[kotlin.Enum]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final] @@ -94,11 +96,11 @@ FILE fqName: fileName:/enum.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -123,11 +125,11 @@ FILE fqName: fileName:/enum.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -152,11 +154,11 @@ FILE fqName: fileName:/enum.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -174,11 +176,11 @@ FILE fqName: fileName:/enum.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -197,6 +199,7 @@ FILE fqName: fileName:/enum.kt CONSTRUCTOR visibility:private <> () returnType:.TestEnum3 [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnum3 modality:FINAL visibility:public superTypes:[kotlin.Enum]' CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum3.TEST @@ -228,11 +231,11 @@ FILE fqName: fileName:/enum.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -252,6 +255,7 @@ FILE fqName: fileName:/enum.kt VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnum4 modality:FINAL visibility:public superTypes:[kotlin.Enum]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final] @@ -280,11 +284,11 @@ FILE fqName: fileName:/enum.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -327,11 +331,11 @@ FILE fqName: fileName:/enum.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -351,11 +355,11 @@ FILE fqName: fileName:/enum.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -377,6 +381,7 @@ FILE fqName: fileName:/enum.kt CONST Int type=kotlin.Int value=0 BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnum5 modality:FINAL visibility:public superTypes:[kotlin.Enum]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final] @@ -418,11 +423,11 @@ FILE fqName: fileName:/enum.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -447,11 +452,11 @@ FILE fqName: fileName:/enum.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -469,11 +474,11 @@ FILE fqName: fileName:/enum.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum diff --git a/compiler/testData/ir/irText/classes/enumClassModality.fir.txt b/compiler/testData/ir/irText/classes/enumClassModality.fir.txt index 39fc38a9f0d..1f410ba5ea6 100644 --- a/compiler/testData/ir/irText/classes/enumClassModality.fir.txt +++ b/compiler/testData/ir/irText/classes/enumClassModality.fir.txt @@ -4,6 +4,7 @@ FILE fqName: fileName:/enumClassModality.kt CONSTRUCTOR visibility:private <> () returnType:.TestFinalEnum1 [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestFinalEnum1 modality:FINAL visibility:public superTypes:[kotlin.Enum]' CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestFinalEnum1.X1 @@ -28,11 +29,11 @@ FILE fqName: fileName:/enumClassModality.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -52,6 +53,7 @@ FILE fqName: fileName:/enumClassModality.kt VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestFinalEnum2 modality:FINAL visibility:public superTypes:[kotlin.Enum]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final] @@ -75,11 +77,11 @@ FILE fqName: fileName:/enumClassModality.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -97,11 +99,11 @@ FILE fqName: fileName:/enumClassModality.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -120,6 +122,7 @@ FILE fqName: fileName:/enumClassModality.kt CONSTRUCTOR visibility:private <> () returnType:.TestFinalEnum3 [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestFinalEnum3 modality:FINAL visibility:public superTypes:[kotlin.Enum]' CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestFinalEnum3.X1 @@ -147,11 +150,11 @@ FILE fqName: fileName:/enumClassModality.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -170,6 +173,7 @@ FILE fqName: fileName:/enumClassModality.kt CONSTRUCTOR visibility:private <> () returnType:.TestOpenEnum1 [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestOpenEnum1 modality:FINAL visibility:public superTypes:[kotlin.Enum]' CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestOpenEnum1.X1 @@ -195,11 +199,11 @@ FILE fqName: fileName:/enumClassModality.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -218,6 +222,7 @@ FILE fqName: fileName:/enumClassModality.kt CONSTRUCTOR visibility:private <> () returnType:.TestOpenEnum2 [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestOpenEnum2 modality:FINAL visibility:public superTypes:[kotlin.Enum]' CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestOpenEnum2.X1 @@ -248,11 +253,11 @@ FILE fqName: fileName:/enumClassModality.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -271,6 +276,7 @@ FILE fqName: fileName:/enumClassModality.kt CONSTRUCTOR visibility:private <> () returnType:.TestAbstractEnum1 [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestAbstractEnum1 modality:FINAL visibility:public superTypes:[kotlin.Enum]' CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAbstractEnum1.X1 @@ -300,11 +306,11 @@ FILE fqName: fileName:/enumClassModality.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -340,6 +346,7 @@ FILE fqName: fileName:/enumClassModality.kt CONSTRUCTOR visibility:private <> () returnType:.TestAbstractEnum2 [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestAbstractEnum2 modality:FINAL visibility:public superTypes:[.IFoo]' CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAbstractEnum2.X1 diff --git a/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.fir.txt b/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.fir.txt index 474dcd85e89..9e018ca459a 100644 --- a/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.fir.txt +++ b/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.fir.txt @@ -5,6 +5,7 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:Test0 modality:FINAL visibility:public superTypes:[kotlin.Enum]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final] @@ -44,11 +45,11 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -68,6 +69,7 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:Test1 modality:FINAL visibility:public superTypes:[kotlin.Enum]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final] @@ -110,11 +112,11 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -136,11 +138,11 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -160,6 +162,7 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:Test2 modality:FINAL visibility:public superTypes:[kotlin.Enum]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final] @@ -212,11 +215,11 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -240,11 +243,11 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum diff --git a/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.fir.txt index 6fd5d665929..7fc7a7ea5ce 100644 --- a/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.fir.txt @@ -133,16 +133,17 @@ FILE fqName: fileName:/classesWithAnnotations.kt CONSTRUCTOR visibility:private <> () returnType:.TestEnum [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnum modality:FINAL visibility:public superTypes:[kotlin.Enum]' FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum diff --git a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.txt index 32e5c53ea62..50e66c649c6 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.txt @@ -32,6 +32,7 @@ FILE fqName: fileName:/enumEntriesWithAnnotations.kt CONSTRUCTOR visibility:private <> () returnType:.TestEnum [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnum modality:FINAL visibility:public superTypes:[kotlin.Enum]' CLASS ENUM_ENTRY name:ENTRY1 modality:FINAL visibility:public superTypes:[kotlin.Any] annotations: @@ -90,11 +91,11 @@ FILE fqName: fileName:/enumEntriesWithAnnotations.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum diff --git a/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.txt b/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.txt index 03b2b2fab77..f58c8c3b229 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.txt @@ -4,6 +4,7 @@ FILE fqName: fileName:/enumsInAnnotationArguments.kt CONSTRUCTOR visibility:private <> () returnType:.En [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:En modality:FINAL visibility:public superTypes:[kotlin.Enum]' CLASS ENUM_ENTRY name:A modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.En.A @@ -85,11 +86,11 @@ FILE fqName: fileName:/enumsInAnnotationArguments.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum diff --git a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.fir.txt b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.fir.txt index f7829a11853..ab6959af0ed 100644 --- a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.fir.txt +++ b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.fir.txt @@ -4,6 +4,7 @@ FILE fqName: fileName:/expectedEnumClass.kt CONSTRUCTOR visibility:private <> () returnType:.MyEnum [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:MyEnum modality:FINAL visibility:public superTypes:[kotlin.Enum]' CLASS ENUM_ENTRY name:FOO modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.MyEnum.FOO @@ -47,11 +48,11 @@ FILE fqName: fileName:/expectedEnumClass.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -70,6 +71,7 @@ FILE fqName: fileName:/expectedEnumClass.kt CONSTRUCTOR visibility:private <> () returnType:.MyEnum [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:MyEnum modality:FINAL visibility:public superTypes:[kotlin.Enum]' CLASS ENUM_ENTRY name:FOO modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.MyEnum.FOO @@ -132,11 +134,11 @@ FILE fqName: fileName:/expectedEnumClass.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum diff --git a/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt index 7dd1f02aa3d..95c4b02302f 100644 --- a/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt +++ b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt @@ -3,6 +3,7 @@ FILE fqName: fileName:/constructorWithOwnTypeParametersCall.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testKotlin (): .K1.K2 declared in ' CONSTRUCTOR_CALL 'public constructor () [primary] declared in .K1.K2' type=.K1.K2 origin=null + : FUN name:testJava visibility:public modality:FINAL <> () returnType:IrErrorType BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testJava (): IrErrorType declared in ' diff --git a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.txt b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.txt index 4d07efe96b2..13b2f8790a7 100644 --- a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.txt +++ b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.txt @@ -4,6 +4,7 @@ FILE fqName: fileName:/enumEntryAsReceiver.kt CONSTRUCTOR visibility:private <> () returnType:.X [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:X modality:FINAL visibility:public superTypes:[kotlin.Enum]' CLASS ENUM_ENTRY name:B modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.X.B @@ -59,11 +60,11 @@ FILE fqName: fileName:/enumEntryAsReceiver.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum diff --git a/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.txt b/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.txt index 9f06890f086..fe3a1deb279 100644 --- a/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.txt +++ b/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.txt @@ -4,6 +4,7 @@ FILE fqName: fileName:/enumEntryReferenceFromEnumEntryClass.kt CONSTRUCTOR visibility:private <> () returnType:.MyEnum [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:MyEnum modality:FINAL visibility:public superTypes:[kotlin.Enum]' CLASS ENUM_ENTRY name:Z modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.MyEnum.Z @@ -103,11 +104,11 @@ FILE fqName: fileName:/enumEntryReferenceFromEnumEntryClass.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum diff --git a/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.fir.txt b/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.fir.txt index f030935735b..6895291948e 100644 --- a/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.fir.txt +++ b/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.fir.txt @@ -12,14 +12,15 @@ FILE fqName: fileName:/genericConstructorCallWithTypeArguments.kt VALUE_PARAMETER name:block index:1 type:kotlin.Function0.testArray> [crossinline] BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testArray (n: kotlin.Int, block: kotlin.Function0.testArray>): kotlin.Array.testArray> [inline] declared in ' - CONSTRUCTOR_CALL 'public constructor (size: kotlin.Int, init: kotlin.Function1>) declared in kotlin.Array' type=kotlin.Array.testArray> origin=null + CONSTRUCTOR_CALL 'public constructor (size: kotlin.Int, init: kotlin.Function1) declared in kotlin.Array' type=kotlin.Array.testArray> origin=null + : size: GET_VAR 'n: kotlin.Int declared in .testArray' type=kotlin.Int origin=null - init: BLOCK type=T of origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:T of + init: BLOCK type=T of kotlin.Array origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:T of kotlin.Array VALUE_PARAMETER name:it index:0 type:kotlin.Int BLOCK_BODY ERROR_CALL 'Unresolved reference: #' type=IrErrorType - FUNCTION_REFERENCE 'local final fun (it: kotlin.Int): T of declared in .testArray' type=T of origin=LAMBDA + FUNCTION_REFERENCE 'local final fun (it: kotlin.Int): T of kotlin.Array declared in .testArray' type=T of kotlin.Array origin=LAMBDA CLASS CLASS name:Box modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Box TYPE_PARAMETER name:T index:0 variance: superTypes:[] diff --git a/compiler/testData/ir/irText/expressions/kt30020.fir.txt b/compiler/testData/ir/irText/expressions/kt30020.fir.txt index d92d69a7a83..15074e2822a 100644 --- a/compiler/testData/ir/irText/expressions/kt30020.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt30020.fir.txt @@ -114,12 +114,12 @@ FILE fqName: fileName:/kt30020.kt $this: VALUE_PARAMETER name: type:kotlin.Any FUN FAKE_OVERRIDE name:add visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, element:kotlin.Int) returnType:kotlin.Boolean overridden: - public abstract fun add (element: E of ): kotlin.Boolean declared in kotlin.collections.MutableList + public abstract fun add (element: E of kotlin.collections.MutableList): kotlin.Boolean declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList VALUE_PARAMETER name:element index:0 type:kotlin.Int FUN FAKE_OVERRIDE name:addAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, index:kotlin.Int, elements:kotlin.collections.Collection) returnType:kotlin.Boolean overridden: - public abstract fun addAll (index: kotlin.Int, elements: kotlin.collections.Collection>): kotlin.Boolean declared in kotlin.collections.MutableList + public abstract fun addAll (index: kotlin.Int, elements: kotlin.collections.Collection): kotlin.Boolean declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList VALUE_PARAMETER name:index index:0 type:kotlin.Int VALUE_PARAMETER name:elements index:1 type:kotlin.collections.Collection @@ -129,58 +129,58 @@ FILE fqName: fileName:/kt30020.kt $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList FUN FAKE_OVERRIDE name:listIterator visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList) returnType:kotlin.collections.MutableListIterator overridden: - public abstract fun listIterator (): kotlin.collections.MutableListIterator> declared in kotlin.collections.MutableList + public abstract fun listIterator (): kotlin.collections.MutableListIterator declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList FUN FAKE_OVERRIDE name:remove visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, element:kotlin.Int) returnType:kotlin.Boolean overridden: - public abstract fun remove (element: E of ): kotlin.Boolean declared in kotlin.collections.MutableList + public abstract fun remove (element: E of kotlin.collections.MutableList): kotlin.Boolean declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList VALUE_PARAMETER name:element index:0 type:kotlin.Int FUN FAKE_OVERRIDE name:removeAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, elements:kotlin.collections.Collection) returnType:kotlin.Boolean overridden: - public abstract fun removeAll (elements: kotlin.collections.Collection>): kotlin.Boolean declared in kotlin.collections.MutableList + public abstract fun removeAll (elements: kotlin.collections.Collection): kotlin.Boolean declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection FUN FAKE_OVERRIDE name:removeAt visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, index:kotlin.Int) returnType:kotlin.Int overridden: - public abstract fun removeAt (index: kotlin.Int): E of declared in kotlin.collections.MutableList + public abstract fun removeAt (index: kotlin.Int): E of kotlin.collections.MutableList declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList VALUE_PARAMETER name:index index:0 type:kotlin.Int FUN FAKE_OVERRIDE name:retainAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, elements:kotlin.collections.Collection) returnType:kotlin.Boolean overridden: - public abstract fun retainAll (elements: kotlin.collections.Collection>): kotlin.Boolean declared in kotlin.collections.MutableList + public abstract fun retainAll (elements: kotlin.collections.Collection): kotlin.Boolean declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection FUN FAKE_OVERRIDE name:set visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, index:kotlin.Int, element:kotlin.Int) returnType:kotlin.Int overridden: - public abstract fun set (index: kotlin.Int, element: E of ): E of declared in kotlin.collections.MutableList + public abstract fun set (index: kotlin.Int, element: E of kotlin.collections.MutableList): E of kotlin.collections.MutableList declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList VALUE_PARAMETER name:index index:0 type:kotlin.Int VALUE_PARAMETER name:element index:1 type:kotlin.Int FUN FAKE_OVERRIDE name:subList visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, fromIndex:kotlin.Int, toIndex:kotlin.Int) returnType:kotlin.collections.MutableList overridden: - public abstract fun subList (fromIndex: kotlin.Int, toIndex: kotlin.Int): kotlin.collections.MutableList> declared in kotlin.collections.MutableList + public abstract fun subList (fromIndex: kotlin.Int, toIndex: kotlin.Int): kotlin.collections.MutableList declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList VALUE_PARAMETER name:fromIndex index:0 type:kotlin.Int VALUE_PARAMETER name:toIndex index:1 type:kotlin.Int FUN FAKE_OVERRIDE name:contains visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List, element:kotlin.Int) returnType:kotlin.Boolean overridden: - public abstract fun contains (element: E of ): kotlin.Boolean declared in kotlin.collections.List + public abstract fun contains (element: E of kotlin.collections.MutableList): kotlin.Boolean declared in kotlin.collections.List $this: VALUE_PARAMETER name: type:kotlin.collections.List VALUE_PARAMETER name:element index:0 type:kotlin.Int FUN FAKE_OVERRIDE name:containsAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List, elements:kotlin.collections.Collection) returnType:kotlin.Boolean overridden: - public abstract fun containsAll (elements: kotlin.collections.Collection>): kotlin.Boolean declared in kotlin.collections.List + public abstract fun containsAll (elements: kotlin.collections.Collection): kotlin.Boolean declared in kotlin.collections.List $this: VALUE_PARAMETER name: type:kotlin.collections.List VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection FUN FAKE_OVERRIDE name:get visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List, index:kotlin.Int) returnType:kotlin.Int overridden: - public abstract fun get (index: kotlin.Int): E of declared in kotlin.collections.List + public abstract fun get (index: kotlin.Int): E of kotlin.collections.MutableList declared in kotlin.collections.List $this: VALUE_PARAMETER name: type:kotlin.collections.List VALUE_PARAMETER name:index index:0 type:kotlin.Int FUN FAKE_OVERRIDE name:indexOf visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List, element:kotlin.Int) returnType:kotlin.Int overridden: - public abstract fun indexOf (element: E of ): kotlin.Int declared in kotlin.collections.List + public abstract fun indexOf (element: E of kotlin.collections.MutableList): kotlin.Int declared in kotlin.collections.List $this: VALUE_PARAMETER name: type:kotlin.collections.List VALUE_PARAMETER name:element index:0 type:kotlin.Int FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List) returnType:kotlin.Boolean @@ -189,11 +189,11 @@ FILE fqName: fileName:/kt30020.kt $this: VALUE_PARAMETER name: type:kotlin.collections.List FUN FAKE_OVERRIDE name:iterator visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List) returnType:kotlin.collections.Iterator overridden: - public abstract fun iterator (): kotlin.collections.Iterator> declared in kotlin.collections.List + public abstract fun iterator (): kotlin.collections.Iterator declared in kotlin.collections.List $this: VALUE_PARAMETER name: type:kotlin.collections.List FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List, element:kotlin.Int) returnType:kotlin.Int overridden: - public abstract fun lastIndexOf (element: E of ): kotlin.Int declared in kotlin.collections.List + public abstract fun lastIndexOf (element: E of kotlin.collections.MutableList): kotlin.Int declared in kotlin.collections.List $this: VALUE_PARAMETER name: type:kotlin.collections.List VALUE_PARAMETER name:element index:0 type:kotlin.Int FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean diff --git a/compiler/testData/ir/irText/expressions/objectAsCallable.fir.txt b/compiler/testData/ir/irText/expressions/objectAsCallable.fir.txt index 9c78c292e48..e00a8cd1f28 100644 --- a/compiler/testData/ir/irText/expressions/objectAsCallable.fir.txt +++ b/compiler/testData/ir/irText/expressions/objectAsCallable.fir.txt @@ -23,6 +23,7 @@ FILE fqName: fileName:/objectAsCallable.kt CONSTRUCTOR visibility:private <> () returnType:.En [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:En modality:FINAL visibility:public superTypes:[kotlin.Enum]' CLASS ENUM_ENTRY name:X modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.En.X @@ -47,11 +48,11 @@ FILE fqName: fileName:/objectAsCallable.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum diff --git a/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.txt b/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.txt index 79d1b7c88e1..c7e6d2ff091 100644 --- a/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.txt +++ b/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.txt @@ -14,6 +14,7 @@ FILE fqName: fileName:/temporaryInEnumEntryInitializer.kt VALUE_PARAMETER name:x index:0 type:kotlin.String? BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:En modality:FINAL visibility:public superTypes:[kotlin.Enum]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String? visibility:public [final] @@ -38,11 +39,11 @@ FILE fqName: fileName:/temporaryInEnumEntryInitializer.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum @@ -60,11 +61,11 @@ FILE fqName: fileName:/temporaryInEnumEntryInitializer.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum diff --git a/compiler/testData/ir/irText/expressions/values.fir.txt b/compiler/testData/ir/irText/expressions/values.fir.txt index eb949a91917..5f4492c65f3 100644 --- a/compiler/testData/ir/irText/expressions/values.fir.txt +++ b/compiler/testData/ir/irText/expressions/values.fir.txt @@ -4,6 +4,7 @@ FILE fqName: fileName:/values.kt CONSTRUCTOR visibility:private <> () returnType:.Enum [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:Enum modality:FINAL visibility:public superTypes:[kotlin.Enum]' CLASS ENUM_ENTRY name:A modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Enum.A @@ -28,11 +29,11 @@ FILE fqName: fileName:/values.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum diff --git a/compiler/testData/ir/irText/singletons/enumEntry.fir.txt b/compiler/testData/ir/irText/singletons/enumEntry.fir.txt index 95d521ace19..987eb3ec382 100644 --- a/compiler/testData/ir/irText/singletons/enumEntry.fir.txt +++ b/compiler/testData/ir/irText/singletons/enumEntry.fir.txt @@ -4,6 +4,7 @@ FILE fqName: fileName:/enumEntry.kt CONSTRUCTOR visibility:private <> () returnType:.Z [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' + : INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:Z modality:FINAL visibility:public superTypes:[kotlin.Enum]' CLASS ENUM_ENTRY name:ENTRY modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Z.ENTRY @@ -54,11 +55,11 @@ FILE fqName: fileName:/enumEntry.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int overridden: - public final fun compareTo (other: E of ): kotlin.Int declared in kotlin.Enum + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:E of + VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum diff --git a/compiler/testData/ir/irText/stubs/builtinMap.fir.txt b/compiler/testData/ir/irText/stubs/builtinMap.fir.txt index a39f9eaba74..8d05c20732f 100644 --- a/compiler/testData/ir/irText/stubs/builtinMap.fir.txt +++ b/compiler/testData/ir/irText/stubs/builtinMap.fir.txt @@ -19,7 +19,7 @@ FILE fqName: fileName:/builtinMap.kt VALUE_PARAMETER name:it index:0 type:java.util.LinkedHashMap.plus, V1 of .plus> BLOCK_BODY ERROR_CALL 'Unresolved reference: #' type=IrErrorType - ERROR_CALL 'No getter found for R|kotlin/Pair.first|' type=A of - ERROR_CALL 'No getter found for R|kotlin/Pair.second|' type=B of + ERROR_CALL 'No getter found for R|kotlin/Pair.first|' type=A of kotlin.Pair + ERROR_CALL 'No getter found for R|kotlin/Pair.second|' type=B of kotlin.Pair FUNCTION_REFERENCE 'local final fun (it: java.util.LinkedHashMap.plus, V1 of .plus>): kotlin.Unit declared in .plus' type=kotlin.Unit origin=LAMBDA diff --git a/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.fir.txt b/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.fir.txt index ab25014836f..dea72e6a691 100644 --- a/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.fir.txt +++ b/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.fir.txt @@ -3,10 +3,12 @@ FILE fqName: fileName:/javaConstructorWithTypeParameters.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1 (): .J1 declared in ' CONSTRUCTOR_CALL 'public constructor () declared in .J1' type=.J1 origin=null - FUN name:test2 visibility:public modality:FINAL <> () returnType:.J1 + : + FUN name:test2 visibility:public modality:FINAL <> () returnType:.J1 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (): .J1 declared in ' CONSTRUCTOR_CALL 'public constructor (x1: X1 of ?) declared in .J1' type=.J1 origin=null + : x1: CONST Int type=kotlin.Int value=1 FUN name:test3 visibility:public modality:FINAL <> (j1:.J1) returnType:IrErrorType VALUE_PARAMETER name:j1 index:0 type:.J1