From a40022efcd382d6b48a3ee836ed05ea1cf6431c5 Mon Sep 17 00:00:00 2001 From: Pavel Kunyavskiy Date: Tue, 14 Sep 2021 19:09:12 +0300 Subject: [PATCH] Generate IR for annotation class constructors. --- .../fir/backend/Fir2IrClassifierStorage.kt | 2 + .../generators/ClassMemberGenerator.kt | 3 +- .../psi2ir/generators/ClassGenerator.kt | 2 + .../psi2ir/generators/FunctionGenerator.kt | 1 - .../irText/classes/annotationClasses.kt.txt | 37 +++++++++++---- .../ir/irText/classes/annotationClasses.txt | 20 ++++++-- .../ir/irText/classes/classes.fir.kt.txt | 8 +++- .../ir/irText/classes/classes.fir.txt | 5 +- .../testData/ir/irText/classes/classes.kt.txt | 9 ++-- .../testData/ir/irText/classes/classes.txt | 5 +- .../annotationOnClassWithInitializer.kt.txt | 8 +++- .../annotationOnClassWithInitializer.txt | 5 +- .../annotationsInAnnotationArguments.kt.txt | 28 ++++++++--- .../annotationsInAnnotationArguments.txt | 15 ++++-- .../annotationsOnDelegatedMembers.fir.kt.txt | 8 +++- .../annotationsOnDelegatedMembers.fir.txt | 5 +- .../annotationsOnDelegatedMembers.kt.txt | 8 +++- .../annotationsOnDelegatedMembers.txt | 5 +- ...notationsWithDefaultParameterValues.kt.txt | 10 ++-- .../annotationsWithDefaultParameterValues.txt | 5 +- .../annotationsWithVarargParameters.kt.txt | 10 ++-- .../annotationsWithVarargParameters.txt | 5 +- .../arrayInAnnotationArguments.kt.txt | 19 ++++++-- .../arrayInAnnotationArguments.txt | 10 +++- .../classLiteralInAnnotation.kt.txt | 10 ++-- .../annotations/classLiteralInAnnotation.txt | 5 +- .../classesWithAnnotations.fir.kt.txt | 17 +++++-- .../classesWithAnnotations.fir.txt | 10 +++- .../annotations/classesWithAnnotations.kt.txt | 18 ++++++-- .../annotations/classesWithAnnotations.txt | 10 +++- ...nstExpressionsInAnnotationArguments.kt.txt | 10 ++-- .../constExpressionsInAnnotationArguments.txt | 5 +- .../constructorsWithAnnotations.kt.txt | 10 ++-- .../constructorsWithAnnotations.txt | 5 +- .../delegateFieldWithAnnotations.kt.txt | 11 +++-- .../delegateFieldWithAnnotations.txt | 5 +- ...ropertyAccessorsWithAnnotations.fir.kt.txt | 9 +++- ...edPropertyAccessorsWithAnnotations.fir.txt | 5 +- ...tedPropertyAccessorsWithAnnotations.kt.txt | 14 ++++-- ...egatedPropertyAccessorsWithAnnotations.txt | 5 +- .../enumEntriesWithAnnotations.fir.kt.txt | 9 +++- .../enumEntriesWithAnnotations.fir.txt | 5 +- .../enumEntriesWithAnnotations.kt.txt | 10 ++-- .../enumEntriesWithAnnotations.txt | 5 +- .../enumsInAnnotationArguments.fir.kt.txt | 9 +++- .../enumsInAnnotationArguments.fir.txt | 5 +- .../enumsInAnnotationArguments.kt.txt | 10 ++-- .../enumsInAnnotationArguments.txt | 5 +- .../annotations/fieldsWithAnnotations.kt.txt | 10 ++-- .../annotations/fieldsWithAnnotations.txt | 5 +- .../annotations/fileAnnotations.kt.txt | 10 ++-- .../annotations/fileAnnotations.txt | 5 +- .../functionsWithAnnotations.kt.txt | 10 ++-- .../annotations/functionsWithAnnotations.txt | 5 +- .../genericAnnotationClasses.kt.txt | 46 ++++++++++++++----- .../annotations/genericAnnotationClasses.txt | 25 ++++++++-- .../javaAnnotationWithSingleArrayArgument.txt | 30 +++++++++--- ...egatedPropertiesWithAnnotations.fir.kt.txt | 9 +++- ...DelegatedPropertiesWithAnnotations.fir.txt | 5 +- ...lDelegatedPropertiesWithAnnotations.kt.txt | 10 ++-- ...ocalDelegatedPropertiesWithAnnotations.txt | 5 +- ...multipleAnnotationsInSquareBrackets.kt.txt | 25 +++++++--- .../multipleAnnotationsInSquareBrackets.txt | 15 ++++-- ...ConstructorParameterWithAnnotations.kt.txt | 9 ++-- ...aryConstructorParameterWithAnnotations.txt | 5 +- .../propertiesWithAnnotations.kt.txt | 10 ++-- .../annotations/propertiesWithAnnotations.txt | 5 +- ...ssorsFromClassHeaderWithAnnotations.kt.txt | 10 ++-- ...ccessorsFromClassHeaderWithAnnotations.txt | 5 +- .../propertyAccessorsWithAnnotations.kt.txt | 10 ++-- .../propertyAccessorsWithAnnotations.txt | 5 +- ...pertySetterParameterWithAnnotations.kt.txt | 9 ++-- ...propertySetterParameterWithAnnotations.txt | 5 +- ...eceiverParameterWithAnnotations.fir.kt.txt | 8 +++- .../receiverParameterWithAnnotations.fir.txt | 5 +- .../receiverParameterWithAnnotations.kt.txt | 9 ++-- .../receiverParameterWithAnnotations.txt | 5 +- ...adOperatorInAnnotationArguments.fir.kt.txt | 9 +++- ...preadOperatorInAnnotationArguments.fir.txt | 5 +- ...spreadOperatorInAnnotationArguments.kt.txt | 10 ++-- .../spreadOperatorInAnnotationArguments.txt | 5 +- .../typeAliasesWithAnnotations.fir.kt.txt | 9 +++- .../typeAliasesWithAnnotations.fir.txt | 5 +- .../typeAliasesWithAnnotations.kt.txt | 9 +++- .../typeAliasesWithAnnotations.txt | 5 +- .../typeParametersWithAnnotations.kt.txt | 9 ++-- .../typeParametersWithAnnotations.txt | 5 +- .../valueParametersWithAnnotations.kt.txt | 10 ++-- .../valueParametersWithAnnotations.txt | 5 +- .../varargsInAnnotationArguments.kt.txt | 28 ++++++++--- .../varargsInAnnotationArguments.txt | 15 ++++-- .../variablesWithAnnotations.kt.txt | 10 ++-- .../annotations/variablesWithAnnotations.txt | 5 +- .../signedToUnsignedConversions.kt.txt | 9 ++-- .../signedToUnsignedConversions.txt | 5 +- .../firProblems/AnnotationInAnnotation.kt.txt | 19 ++++++-- .../firProblems/AnnotationInAnnotation.txt | 10 +++- .../firProblems/TypeParameterBounds.kt.txt | 25 +++++++--- .../firProblems/TypeParameterBounds.txt | 15 ++++-- .../ir/sourceRanges/declarations/classes.txt | 5 +- 100 files changed, 743 insertions(+), 244 deletions(-) diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrClassifierStorage.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrClassifierStorage.kt index 7538973b34f..279332b7cb2 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrClassifierStorage.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrClassifierStorage.kt @@ -236,6 +236,8 @@ class Fir2IrClassifierStorage( val visibility = regularClass.visibility val modality = if (regularClass.classKind == ClassKind.ENUM_CLASS) { regularClass.enumClassModality() + } else if (regularClass.classKind == ClassKind.ANNOTATION_CLASS) { + Modality.OPEN } else { regularClass.modality ?: Modality.FINAL } diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/ClassMemberGenerator.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/ClassMemberGenerator.kt index ef6451964cc..c1ffeab0831 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/ClassMemberGenerator.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/ClassMemberGenerator.kt @@ -29,7 +29,6 @@ import org.jetbrains.kotlin.ir.expressions.impl.* import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol import org.jetbrains.kotlin.ir.types.IrType import org.jetbrains.kotlin.ir.util.constructedClassType -import org.jetbrains.kotlin.ir.util.isAnnotationClass import org.jetbrains.kotlin.ir.util.isSetter import org.jetbrains.kotlin.ir.util.parentAsClass @@ -100,7 +99,7 @@ internal class ClassMemberGenerator( } annotationGenerator.generate(irFunction, firFunction) } - if (firFunction is FirConstructor && irFunction is IrConstructor && !parentAsClass.isAnnotationClass && !firFunction.isExpect) { + if (firFunction is FirConstructor && irFunction is IrConstructor && !firFunction.isExpect) { val body = factory.createBlockBody(startOffset, endOffset) val delegatedConstructor = firFunction.delegatedConstructor if (delegatedConstructor != null) { diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ClassGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ClassGenerator.kt index a2e600f7704..7ff08078e06 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ClassGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ClassGenerator.kt @@ -120,6 +120,8 @@ class ClassGenerator( private fun getEffectiveModality(ktClassOrObject: KtPureClassOrObject, classDescriptor: ClassDescriptor): Modality = when { + DescriptorUtils.isAnnotationClass(classDescriptor) -> + Modality.OPEN !DescriptorUtils.isEnumClass(classDescriptor) -> classDescriptor.modality DescriptorUtils.hasAbstractMembers(classDescriptor) -> diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/FunctionGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/FunctionGenerator.kt index ae79576e1ef..0aaf356628f 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/FunctionGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/FunctionGenerator.kt @@ -228,7 +228,6 @@ class FunctionGenerator(declarationGenerator: DeclarationGenerator) : Declaratio declareConstructor(ktClassOrObject, ktClassOrObject.primaryConstructor ?: ktClassOrObject, primaryConstructorDescriptor) { if ( primaryConstructorDescriptor.isExpect || - DescriptorUtils.isAnnotationClass(primaryConstructorDescriptor.constructedClass) || primaryConstructorDescriptor.constructedClass.isEffectivelyExternal() ) null diff --git a/compiler/testData/ir/irText/classes/annotationClasses.kt.txt b/compiler/testData/ir/irText/classes/annotationClasses.kt.txt index a9ac442c399..bfac59e02a9 100644 --- a/compiler/testData/ir/irText/classes/annotationClasses.kt.txt +++ b/compiler/testData/ir/irText/classes/annotationClasses.kt.txt @@ -1,32 +1,51 @@ -annotation class Test1 : Annotation { - constructor(x: Int) /* primary */ +open annotation class Test1 : Annotation { + constructor(x: Int) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: Int field = x get } -annotation class Test2 : Annotation { - constructor(x: Int = 0) /* primary */ +open annotation class Test2 : Annotation { + constructor(x: Int = 0) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: Int field = x get } -annotation class Test3 : Annotation { - constructor(x: Test1) /* primary */ +open annotation class Test3 : Annotation { + constructor(x: Test1) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: Test1 field = x get } -annotation class Test4 : Annotation { - constructor(vararg xs: Int) /* primary */ +open annotation class Test4 : Annotation { + constructor(vararg xs: Int) /* primary */ { + super/*Any*/() + /* () */ + + } + val xs: IntArray field = xs get } - diff --git a/compiler/testData/ir/irText/classes/annotationClasses.txt b/compiler/testData/ir/irText/classes/annotationClasses.txt index 25132b3fce2..25da9f6881c 100644 --- a/compiler/testData/ir/irText/classes/annotationClasses.txt +++ b/compiler/testData/ir/irText/classes/annotationClasses.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/annotationClasses.kt - CLASS ANNOTATION_CLASS name:Test1 modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Test1 modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1 CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.Test1 [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 ANNOTATION_CLASS name:Test1 modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final] EXPRESSION_BODY @@ -27,12 +30,15 @@ FILE fqName: fileName:/annotationClasses.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:Test2 modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Test2 modality:OPEN visibility:public superTypes:[kotlin.Annotation] $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 EXPRESSION_BODY CONST Int type=kotlin.Int value=0 + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Test2 modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final] EXPRESSION_BODY @@ -57,10 +63,13 @@ FILE fqName: fileName:/annotationClasses.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:Test3 modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Test3 modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test3 CONSTRUCTOR visibility:public <> (x:.Test1) returnType:.Test3 [primary] VALUE_PARAMETER name:x index:0 type:.Test1 + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Test3 modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:.Test1 visibility:private [final] EXPRESSION_BODY @@ -85,10 +94,13 @@ FILE fqName: fileName:/annotationClasses.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:Test4 modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Test4 modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test4 CONSTRUCTOR visibility:public <> (xs:kotlin.IntArray) returnType:.Test4 [primary] 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' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Test4 modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:xs visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.IntArray visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/classes/classes.fir.kt.txt b/compiler/testData/ir/irText/classes/classes.fir.kt.txt index f414e52079e..902608557ae 100644 --- a/compiler/testData/ir/irText/classes/classes.fir.kt.txt +++ b/compiler/testData/ir/irText/classes/classes.fir.kt.txt @@ -20,8 +20,12 @@ object TestObject { } -annotation class TestAnnotationClass : Annotation { - constructor() /* primary */ +open annotation class TestAnnotationClass : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } diff --git a/compiler/testData/ir/irText/classes/classes.fir.txt b/compiler/testData/ir/irText/classes/classes.fir.txt index e39927ba33e..33174690a15 100644 --- a/compiler/testData/ir/irText/classes/classes.fir.txt +++ b/compiler/testData/ir/irText/classes/classes.fir.txt @@ -52,9 +52,12 @@ FILE fqName: fileName:/classes.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:TestAnnotationClass modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnnotationClass modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnnotationClass CONSTRUCTOR visibility:public <> () returnType:.TestAnnotationClass [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnnotationClass modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation diff --git a/compiler/testData/ir/irText/classes/classes.kt.txt b/compiler/testData/ir/irText/classes/classes.kt.txt index 1d635a53e2e..902608557ae 100644 --- a/compiler/testData/ir/irText/classes/classes.kt.txt +++ b/compiler/testData/ir/irText/classes/classes.kt.txt @@ -20,8 +20,12 @@ object TestObject { } -annotation class TestAnnotationClass : Annotation { - constructor() /* primary */ +open annotation class TestAnnotationClass : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } @@ -37,4 +41,3 @@ enum class TestEnumClass : Enum { fun valueOf(value: String): TestEnumClass /* Synthetic body for ENUM_VALUEOF */ } - diff --git a/compiler/testData/ir/irText/classes/classes.txt b/compiler/testData/ir/irText/classes/classes.txt index 885bdb2ef66..568eaca2b3d 100644 --- a/compiler/testData/ir/irText/classes/classes.txt +++ b/compiler/testData/ir/irText/classes/classes.txt @@ -52,9 +52,12 @@ FILE fqName: fileName:/classes.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:TestAnnotationClass modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnnotationClass modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnnotationClass CONSTRUCTOR visibility:public <> () returnType:.TestAnnotationClass [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnnotationClass modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation diff --git a/compiler/testData/ir/irText/declarations/annotations/annotationOnClassWithInitializer.kt.txt b/compiler/testData/ir/irText/declarations/annotations/annotationOnClassWithInitializer.kt.txt index 3bebae06d79..6495ca8f2b5 100644 --- a/compiler/testData/ir/irText/declarations/annotations/annotationOnClassWithInitializer.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/annotationOnClassWithInitializer.kt.txt @@ -1,5 +1,9 @@ -annotation class SomeAnn : Annotation { - constructor() /* primary */ +open annotation class SomeAnn : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } diff --git a/compiler/testData/ir/irText/declarations/annotations/annotationOnClassWithInitializer.txt b/compiler/testData/ir/irText/declarations/annotations/annotationOnClassWithInitializer.txt index 4d1c71f3a9d..b79395254f3 100644 --- a/compiler/testData/ir/irText/declarations/annotations/annotationOnClassWithInitializer.txt +++ b/compiler/testData/ir/irText/declarations/annotations/annotationOnClassWithInitializer.txt @@ -1,7 +1,10 @@ FILE fqName: fileName:/annotationOnClassWithInitializer.kt - CLASS ANNOTATION_CLASS name:SomeAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:SomeAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.SomeAnn CONSTRUCTOR visibility:public <> () returnType:.SomeAnn [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:SomeAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation diff --git a/compiler/testData/ir/irText/declarations/annotations/annotationsInAnnotationArguments.kt.txt b/compiler/testData/ir/irText/declarations/annotations/annotationsInAnnotationArguments.kt.txt index f680f764500..c07cfe3b1de 100644 --- a/compiler/testData/ir/irText/declarations/annotations/annotationsInAnnotationArguments.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/annotationsInAnnotationArguments.kt.txt @@ -1,21 +1,36 @@ -annotation class A1 : Annotation { - constructor(x: Int) /* primary */ +open annotation class A1 : Annotation { + constructor(x: Int) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: Int field = x get } -annotation class A2 : Annotation { - constructor(a: A1) /* primary */ +open annotation class A2 : Annotation { + constructor(a: A1) /* primary */ { + super/*Any*/() + /* () */ + + } + val a: A1 field = a get } -annotation class AA : Annotation { - constructor(xs: Array) /* primary */ +open annotation class AA : Annotation { + constructor(xs: Array) /* primary */ { + super/*Any*/() + /* () */ + + } + val xs: Array field = xs get @@ -26,4 +41,3 @@ annotation class AA : Annotation { @AA(xs = [A1(x = 1), A1(x = 2)]) fun test() { } - diff --git a/compiler/testData/ir/irText/declarations/annotations/annotationsInAnnotationArguments.txt b/compiler/testData/ir/irText/declarations/annotations/annotationsInAnnotationArguments.txt index 27d5a37956c..952c6b91a18 100644 --- a/compiler/testData/ir/irText/declarations/annotations/annotationsInAnnotationArguments.txt +++ b/compiler/testData/ir/irText/declarations/annotations/annotationsInAnnotationArguments.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/annotationsInAnnotationArguments.kt - CLASS ANNOTATION_CLASS name:A1 modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A1 modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A1 CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.A1 [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 ANNOTATION_CLASS name:A1 modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final] EXPRESSION_BODY @@ -27,10 +30,13 @@ FILE fqName: fileName:/annotationsInAnnotationArguments.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:A2 modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A2 modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A2 CONSTRUCTOR visibility:public <> (a:.A1) returnType:.A2 [primary] VALUE_PARAMETER name:a index:0 type:.A1 + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:A2 modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:a visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:a type:.A1 visibility:private [final] EXPRESSION_BODY @@ -55,10 +61,13 @@ FILE fqName: fileName:/annotationsInAnnotationArguments.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:AA modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:AA modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.AA CONSTRUCTOR visibility:public <> (xs:kotlin.Array<.A1>) returnType:.AA [primary] VALUE_PARAMETER name:xs index:0 type:kotlin.Array<.A1> + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:AA modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:xs visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array<.A1> visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.fir.kt.txt b/compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.fir.kt.txt index 843837c836c..41c418595ba 100644 --- a/compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.fir.kt.txt @@ -1,5 +1,9 @@ -annotation class Ann : Annotation { - constructor() /* primary */ +open annotation class Ann : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } diff --git a/compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.fir.txt b/compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.fir.txt index b37824ee756..39b438b0aaa 100644 --- a/compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.fir.txt @@ -1,7 +1,10 @@ FILE fqName: fileName:/annotationsOnDelegatedMembers.kt - CLASS ANNOTATION_CLASS name:Ann modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Ann modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Ann CONSTRUCTOR visibility:public <> () returnType:.Ann [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Ann modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation diff --git a/compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.kt.txt b/compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.kt.txt index 398b151e39f..1845618e6ba 100644 --- a/compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.kt.txt @@ -1,5 +1,9 @@ -annotation class Ann : Annotation { - constructor() /* primary */ +open annotation class Ann : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } diff --git a/compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.txt b/compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.txt index ab3239e70c3..debf152e988 100644 --- a/compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.txt +++ b/compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.txt @@ -1,7 +1,10 @@ FILE fqName: fileName:/annotationsOnDelegatedMembers.kt - CLASS ANNOTATION_CLASS name:Ann modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Ann modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Ann CONSTRUCTOR visibility:public <> () returnType:.Ann [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Ann modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation diff --git a/compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.kt.txt b/compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.kt.txt index 7b8970af9b7..3c5c7b53536 100644 --- a/compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.kt.txt @@ -1,5 +1,10 @@ -annotation class A : Annotation { - constructor(x: String = "", y: Int = 42) /* primary */ +open annotation class A : Annotation { + constructor(x: String = "", y: Int = 42) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: String field = x get @@ -29,4 +34,3 @@ fun test4() { @A fun test5() { } - diff --git a/compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.txt b/compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.txt index bfd34b39f0e..fa798ec505a 100644 --- a/compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.txt +++ b/compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.txt @@ -1,5 +1,5 @@ FILE fqName: fileName:/annotationsWithDefaultParameterValues.kt - CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A CONSTRUCTOR visibility:public <> (x:kotlin.String, y:kotlin.Int) returnType:.A [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String @@ -8,6 +8,9 @@ FILE fqName: fileName:/annotationsWithDefaultParameterValues.kt VALUE_PARAMETER name:y index:1 type:kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value=42 + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.kt.txt b/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.kt.txt index dfe32782f06..27d76371cc6 100644 --- a/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.kt.txt @@ -1,5 +1,10 @@ -annotation class A : Annotation { - constructor(vararg xs: String) /* primary */ +open annotation class A : Annotation { + constructor(vararg xs: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val xs: Array field = xs get @@ -17,4 +22,3 @@ fun test2() { @A(xs = []) fun test3() { } - diff --git a/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.txt b/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.txt index 81c52e3c692..f09cd779103 100644 --- a/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.txt +++ b/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/annotationsWithVarargParameters.kt - CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A CONSTRUCTOR visibility:public <> (xs:kotlin.Array) returnType:.A [primary] VALUE_PARAMETER name:xs index:0 type:kotlin.Array varargElementType:kotlin.String [vararg] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:xs visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.kt.txt b/compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.kt.txt index 08457e535cb..b3350fd9b21 100644 --- a/compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.kt.txt @@ -1,13 +1,23 @@ -annotation class TestAnnWithIntArray : Annotation { - constructor(x: IntArray) /* primary */ +open annotation class TestAnnWithIntArray : Annotation { + constructor(x: IntArray) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: IntArray field = x get } -annotation class TestAnnWithStringArray : Annotation { - constructor(x: Array) /* primary */ +open annotation class TestAnnWithStringArray : Annotation { + constructor(x: Array) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: Array field = x get @@ -23,4 +33,3 @@ fun test1() { @TestAnnWithStringArray(x = ["d", "e", "f"]) fun test2() { } - diff --git a/compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.txt b/compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.txt index 3c6d60795ed..4dbce55f1f0 100644 --- a/compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.txt +++ b/compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/arrayInAnnotationArguments.kt - CLASS ANNOTATION_CLASS name:TestAnnWithIntArray modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnnWithIntArray modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnnWithIntArray CONSTRUCTOR visibility:public <> (x:kotlin.IntArray) returnType:.TestAnnWithIntArray [primary] VALUE_PARAMETER name:x index:0 type:kotlin.IntArray + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnnWithIntArray modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.IntArray visibility:private [final] EXPRESSION_BODY @@ -27,10 +30,13 @@ FILE fqName: fileName:/arrayInAnnotationArguments.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:TestAnnWithStringArray modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnnWithStringArray modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnnWithStringArray CONSTRUCTOR visibility:public <> (x:kotlin.Array) returnType:.TestAnnWithStringArray [primary] VALUE_PARAMETER name:x index:0 type:kotlin.Array + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnnWithStringArray modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Array visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/classLiteralInAnnotation.kt.txt b/compiler/testData/ir/irText/declarations/annotations/classLiteralInAnnotation.kt.txt index 40b5ffcdbd6..b3b87463e28 100644 --- a/compiler/testData/ir/irText/declarations/annotations/classLiteralInAnnotation.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/classLiteralInAnnotation.kt.txt @@ -1,5 +1,10 @@ -annotation class A : Annotation { - constructor(klass: KClass<*>) /* primary */ +open annotation class A : Annotation { + constructor(klass: KClass<*>) /* primary */ { + super/*Any*/() + /* () */ + + } + val klass: KClass<*> field = klass get @@ -18,4 +23,3 @@ class C { @A(klass = C::class) fun test1() { } - diff --git a/compiler/testData/ir/irText/declarations/annotations/classLiteralInAnnotation.txt b/compiler/testData/ir/irText/declarations/annotations/classLiteralInAnnotation.txt index b57cf883c7f..ec6327ceca2 100644 --- a/compiler/testData/ir/irText/declarations/annotations/classLiteralInAnnotation.txt +++ b/compiler/testData/ir/irText/declarations/annotations/classLiteralInAnnotation.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/classLiteralInAnnotation.kt - CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A CONSTRUCTOR visibility:public <> (klass:kotlin.reflect.KClass<*>) returnType:.A [primary] VALUE_PARAMETER name:klass index:0 type:kotlin.reflect.KClass<*> + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:klass visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:klass type:kotlin.reflect.KClass<*> visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.fir.kt.txt b/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.fir.kt.txt index 4bdfa727a8f..88aa89d0dcc 100644 --- a/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.fir.kt.txt @@ -1,5 +1,10 @@ -annotation class TestAnn : Annotation { - constructor(x: String) /* primary */ +open annotation class TestAnn : Annotation { + constructor(x: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: String field = x get @@ -65,7 +70,11 @@ enum class TestEnum : Enum { } @TestAnn(x = "annotation") -annotation class TestAnnotation : Annotation { - constructor() /* primary */ +open annotation class TestAnnotation : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } diff --git a/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.fir.txt index 33bd36a4204..f15a987dfb2 100644 --- a/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.fir.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/classesWithAnnotations.kt - CLASS ANNOTATION_CLASS name:TestAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnn CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:.TestAnn [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final] EXPRESSION_BODY @@ -178,11 +181,14 @@ FILE fqName: fileName:/classesWithAnnotations.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - CLASS ANNOTATION_CLASS name:TestAnnotation modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnnotation modality:OPEN visibility:public superTypes:[kotlin.Annotation] annotations: TestAnn(x = 'annotation') $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnnotation CONSTRUCTOR visibility:public <> () returnType:.TestAnnotation [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnnotation modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation diff --git a/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.kt.txt index 98dacab33e4..88aa89d0dcc 100644 --- a/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.kt.txt @@ -1,5 +1,10 @@ -annotation class TestAnn : Annotation { - constructor(x: String) /* primary */ +open annotation class TestAnn : Annotation { + constructor(x: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: String field = x get @@ -65,8 +70,11 @@ enum class TestEnum : Enum { } @TestAnn(x = "annotation") -annotation class TestAnnotation : Annotation { - constructor() /* primary */ +open annotation class TestAnnotation : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } - diff --git a/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.txt index 26a4fe47b6a..15be001d752 100644 --- a/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/classesWithAnnotations.kt - CLASS ANNOTATION_CLASS name:TestAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnn CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:.TestAnn [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final] EXPRESSION_BODY @@ -186,11 +189,14 @@ FILE fqName: fileName:/classesWithAnnotations.kt FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:.TestEnum VALUE_PARAMETER name:value index:0 type:kotlin.String SYNTHETIC_BODY kind=ENUM_VALUEOF - CLASS ANNOTATION_CLASS name:TestAnnotation modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnnotation modality:OPEN visibility:public superTypes:[kotlin.Annotation] annotations: TestAnn(x = 'annotation') $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnnotation CONSTRUCTOR visibility:public <> () returnType:.TestAnnotation [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnnotation modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation diff --git a/compiler/testData/ir/irText/declarations/annotations/constExpressionsInAnnotationArguments.kt.txt b/compiler/testData/ir/irText/declarations/annotations/constExpressionsInAnnotationArguments.kt.txt index f5501498df1..c1c090b743a 100644 --- a/compiler/testData/ir/irText/declarations/annotations/constExpressionsInAnnotationArguments.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/constExpressionsInAnnotationArguments.kt.txt @@ -2,8 +2,13 @@ const val ONE: Int field = 1 get -annotation class A : Annotation { - constructor(x: Int) /* primary */ +open annotation class A : Annotation { + constructor(x: Int) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: Int field = x get @@ -17,4 +22,3 @@ fun test1() { @A(x = 2) fun test2() { } - diff --git a/compiler/testData/ir/irText/declarations/annotations/constExpressionsInAnnotationArguments.txt b/compiler/testData/ir/irText/declarations/annotations/constExpressionsInAnnotationArguments.txt index 1ad8ae86901..c798bd3e9d4 100644 --- a/compiler/testData/ir/irText/declarations/annotations/constExpressionsInAnnotationArguments.txt +++ b/compiler/testData/ir/irText/declarations/annotations/constExpressionsInAnnotationArguments.txt @@ -8,10 +8,13 @@ FILE fqName: fileName:/constExpressionsInAnnotationArguments.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:ONE type:kotlin.Int visibility:public [final,static]' type=kotlin.Int origin=null - CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.A [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 ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/constructorsWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/constructorsWithAnnotations.kt.txt index 8920ef5e3db..02398b45631 100644 --- a/compiler/testData/ir/irText/declarations/annotations/constructorsWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/constructorsWithAnnotations.kt.txt @@ -1,5 +1,10 @@ -annotation class TestAnn : Annotation { - constructor(x: Int) /* primary */ +open annotation class TestAnn : Annotation { + constructor(x: Int) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: Int field = x get @@ -20,4 +25,3 @@ class TestClass { } } - diff --git a/compiler/testData/ir/irText/declarations/annotations/constructorsWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/constructorsWithAnnotations.txt index 61dee86f493..fbe4db2fca3 100644 --- a/compiler/testData/ir/irText/declarations/annotations/constructorsWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/constructorsWithAnnotations.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/constructorsWithAnnotations.kt - CLASS ANNOTATION_CLASS name:TestAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnn CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.TestAnn [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 ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.kt.txt index 5ef1a5378a3..fbc0c10f13b 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.kt.txt @@ -1,9 +1,13 @@ -annotation class Ann : Annotation { - constructor() /* primary */ +open annotation class Ann : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } -val test1: Int /* by */ +val test1: Int /* by */ field = lazy(initializer = local fun (): Int { return 42 } @@ -11,4 +15,3 @@ val test1: Int /* by */ get(): Int { return #test1$delegate.getValue(thisRef = null, property = ::test1) } - diff --git a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt index f89150df626..1afbd09d3db 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt @@ -1,7 +1,10 @@ FILE fqName: fileName:/delegateFieldWithAnnotations.kt - CLASS ANNOTATION_CLASS name:Ann modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Ann modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Ann CONSTRUCTOR visibility:public <> () returnType:.Ann [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Ann modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation diff --git a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.kt.txt b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.kt.txt index 88ae26ae9aa..e5a5858e7c3 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.kt.txt @@ -1,5 +1,10 @@ -annotation class A : Annotation { - constructor(x: String) /* primary */ +open annotation class A : Annotation { + constructor(x: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: String field = x get diff --git a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.txt index 9ef5b20cb74..0c7977baeda 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt - CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:.A [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.kt.txt index 003b6d66c2c..2a9511c3c79 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.kt.txt @@ -1,5 +1,10 @@ -annotation class A : Annotation { - constructor(x: String) /* primary */ +open annotation class A : Annotation { + constructor(x: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: String field = x get @@ -28,14 +33,14 @@ class Cell { } -val test1: Int /* by */ +val test1: Int /* by */ field = Cell(value = 1) @A(x = "test1.get") get(): Int { return #test1$delegate.getValue(thisRef = null, kProp = ::test1) } -var test2: Int /* by */ +var test2: Int /* by */ field = Cell(value = 2) @A(x = "test2.get") get(): Int { @@ -45,4 +50,3 @@ var test2: Int /* by */ set(@A(x = "test2.set.param") : Int) { return #test2$delegate.setValue(thisRef = null, kProp = ::test2, newValue = ) } - diff --git a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.txt index 0f18bc54417..4286cc01f6b 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt - CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:.A [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.kt.txt b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.kt.txt index 1b3abe7ab30..c9024835c28 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.kt.txt @@ -1,5 +1,10 @@ -annotation class TestAnn : Annotation { - constructor(x: String) /* primary */ +open annotation class TestAnn : Annotation { + constructor(x: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: String field = x get diff --git a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.txt index 154b0dd2197..c28468183df 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/enumEntriesWithAnnotations.kt - CLASS ANNOTATION_CLASS name:TestAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnn CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:.TestAnn [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.kt.txt index a409bf197a4..057e1499bb0 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.kt.txt @@ -1,5 +1,10 @@ -annotation class TestAnn : Annotation { - constructor(x: String) /* primary */ +open annotation class TestAnn : Annotation { + constructor(x: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: String field = x get @@ -37,4 +42,3 @@ open enum class TestEnum : Enum { fun valueOf(value: String): TestEnum /* Synthetic body for ENUM_VALUEOF */ } - diff --git a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.txt index a401e068a06..c3d864398b8 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/enumEntriesWithAnnotations.kt - CLASS ANNOTATION_CLASS name:TestAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnn CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:.TestAnn [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.kt.txt b/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.kt.txt index 8b8fb80eb7d..9a05791b38f 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.kt.txt @@ -19,8 +19,13 @@ enum class En : Enum { } -annotation class TestAnn : Annotation { - constructor(x: En) /* primary */ +open annotation class TestAnn : Annotation { + constructor(x: En) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: En field = x get diff --git a/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.txt b/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.txt index 1109e432d9b..ff16f87ea3b 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.txt @@ -61,10 +61,13 @@ FILE fqName: fileName:/enumsInAnnotationArguments.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - CLASS ANNOTATION_CLASS name:TestAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnn CONSTRUCTOR visibility:public <> (x:.En) returnType:.TestAnn [primary] VALUE_PARAMETER name:x index:0 type:.En + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:.En visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.kt.txt b/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.kt.txt index 07e4e7ed651..9a05791b38f 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.kt.txt @@ -19,8 +19,13 @@ enum class En : Enum { } -annotation class TestAnn : Annotation { - constructor(x: En) /* primary */ +open annotation class TestAnn : Annotation { + constructor(x: En) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: En field = x get @@ -30,4 +35,3 @@ annotation class TestAnn : Annotation { @TestAnn(x = En.A) fun test1() { } - diff --git a/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.txt b/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.txt index 285567bbc0a..8342feba789 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.txt @@ -69,10 +69,13 @@ FILE fqName: fileName:/enumsInAnnotationArguments.kt FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:.En VALUE_PARAMETER name:value index:0 type:kotlin.String SYNTHETIC_BODY kind=ENUM_VALUEOF - CLASS ANNOTATION_CLASS name:TestAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnn CONSTRUCTOR visibility:public <> (x:.En) returnType:.TestAnn [primary] VALUE_PARAMETER name:x index:0 type:.En + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:.En visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.kt.txt index 278bf188595..cf4b9242f62 100644 --- a/compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.kt.txt @@ -1,5 +1,10 @@ -annotation class TestAnn : Annotation { - constructor(x: String) /* primary */ +open annotation class TestAnn : Annotation { + constructor(x: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: String field = x get @@ -14,4 +19,3 @@ var testVar: String field = "a var" get set - diff --git a/compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.txt index 94700266f7f..81dddc8a607 100644 --- a/compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/fieldsWithAnnotations.kt - CLASS ANNOTATION_CLASS name:TestAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnn CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:.TestAnn [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.kt.txt index 0bd670b91cc..a67427fee4d 100644 --- a/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.kt.txt @@ -2,11 +2,15 @@ package test @Target(allowedTargets = [AnnotationTarget.FILE]) -annotation class A : Annotation { - constructor(x: String) /* primary */ +open annotation class A : Annotation { + constructor(x: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: String field = x get } - diff --git a/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.txt index a7a6f3582c0..b5222bba58d 100644 --- a/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.txt @@ -1,12 +1,15 @@ FILE fqName:test fileName:/fileAnnotations.kt annotations: A(x = 'File annotation') - CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation] annotations: Target(allowedTargets = [GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:FILE' type=kotlin.annotation.AnnotationTarget]) $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:test.A CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:test.A [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/functionsWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/functionsWithAnnotations.kt.txt index 529a3f973e2..0b9af9f0381 100644 --- a/compiler/testData/ir/irText/declarations/annotations/functionsWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/functionsWithAnnotations.kt.txt @@ -1,5 +1,10 @@ -annotation class TestAnn : Annotation { - constructor(x: Int) /* primary */ +open annotation class TestAnn : Annotation { + constructor(x: Int) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: Int field = x get @@ -9,4 +14,3 @@ annotation class TestAnn : Annotation { @TestAnn(x = 42) fun testSimpleFunction() { } - diff --git a/compiler/testData/ir/irText/declarations/annotations/functionsWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/functionsWithAnnotations.txt index 798c2e82ae0..40bc7639df0 100644 --- a/compiler/testData/ir/irText/declarations/annotations/functionsWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/functionsWithAnnotations.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/functionsWithAnnotations.kt - CLASS ANNOTATION_CLASS name:TestAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnn CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.TestAnn [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 ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.kt.txt b/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.kt.txt index 2821ce4cd91..0c0e15bcc16 100644 --- a/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.kt.txt @@ -1,15 +1,25 @@ package ann -annotation class Test1 : Annotation { - constructor(x: Int) /* primary */ +open annotation class Test1 : Annotation { + constructor(x: Int) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: Int field = x get } -annotation class Test2 : Annotation { - constructor(x: Int = 0) /* primary */ +open annotation class Test2 : Annotation { + constructor(x: Int = 0) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: Int field = x get @@ -20,8 +30,13 @@ interface I { } -annotation class Test3> : Annotation { - constructor(x: Test1>) /* primary */ +open annotation class Test3> : Annotation { + constructor(x: Test1>) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: Test1> field = x get @@ -37,8 +52,13 @@ class C : I { } -annotation class Test4 : Annotation { - constructor(x: Array>>) /* primary */ +open annotation class Test4 : Annotation { + constructor(x: Array>>) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: Array>> field = x get @@ -54,8 +74,13 @@ class ARG { } -annotation class Test5 : Annotation { - constructor(vararg xs: Test3>) /* primary */ +open annotation class Test5 : Annotation { + constructor(vararg xs: Test3>) /* primary */ { + super/*Any*/() + /* () */ + + } + val xs: Array>> field = xs get @@ -75,4 +100,3 @@ class CC { } } - diff --git a/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.txt b/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.txt index 1553eecd21f..e42d937169b 100644 --- a/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.txt +++ b/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.txt @@ -1,9 +1,12 @@ FILE fqName:ann fileName:/genericAnnotationClasses.kt - CLASS ANNOTATION_CLASS name:Test1 modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Test1 modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:ann.Test1 TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:ann.Test1 [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 ANNOTATION_CLASS name:Test1 modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final] EXPRESSION_BODY @@ -28,7 +31,7 @@ FILE fqName:ann fileName:/genericAnnotationClasses.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:Test2 modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Test2 modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:ann.Test2 TYPE_PARAMETER name:T1 index:0 variance: superTypes:[kotlin.Any] TYPE_PARAMETER name:T2 index:1 variance: superTypes:[kotlin.Any?] @@ -36,6 +39,9 @@ FILE fqName:ann fileName:/genericAnnotationClasses.kt VALUE_PARAMETER name:x index:0 type:kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value=0 + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Test2 modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final] EXPRESSION_BODY @@ -76,12 +82,15 @@ FILE fqName:ann fileName:/genericAnnotationClasses.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:Test3 modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Test3 modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:ann.Test3 TYPE_PARAMETER name:T1 index:0 variance: superTypes:[kotlin.Any?] TYPE_PARAMETER name:T2 index:1 variance: superTypes:[ann.I] CONSTRUCTOR visibility:public <> (x:ann.Test1>) returnType:ann.Test3 [primary] VALUE_PARAMETER name:x index:0 type:ann.Test1> + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Test3 modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:ann.Test1> visibility:private [final] EXPRESSION_BODY @@ -126,10 +135,13 @@ FILE fqName:ann fileName:/genericAnnotationClasses.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in ann.I $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:Test4 modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Test4 modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:ann.Test4 CONSTRUCTOR visibility:public <> (x:kotlin.Array>>) returnType:ann.Test4 [primary] VALUE_PARAMETER name:x index:0 type:kotlin.Array>> + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Test4 modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Array>> visibility:private [final] EXPRESSION_BODY @@ -173,11 +185,14 @@ FILE fqName:ann fileName:/genericAnnotationClasses.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:Test5 modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Test5 modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:ann.Test5 TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] CONSTRUCTOR visibility:public <> (xs:kotlin.Array>>) returnType:ann.Test5 [primary] VALUE_PARAMETER name:xs index:0 type:kotlin.Array>> varargElementType:ann.Test3> [vararg] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Test5 modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:xs visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array>> visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/javaAnnotationWithSingleArrayArgument.txt b/compiler/testData/ir/irText/declarations/annotations/javaAnnotationWithSingleArrayArgument.txt index 5e08c3887f5..3f182423245 100644 --- a/compiler/testData/ir/irText/declarations/annotations/javaAnnotationWithSingleArrayArgument.txt +++ b/compiler/testData/ir/irText/declarations/annotations/javaAnnotationWithSingleArrayArgument.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/C.kt - CLASS ANNOTATION_CLASS name:Anno modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Anno modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Anno CONSTRUCTOR visibility:public <> (token:kotlin.String) returnType:.Anno [primary] VALUE_PARAMETER name:token index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Anno modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:token visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:token type:kotlin.String visibility:private [final] EXPRESSION_BODY @@ -88,10 +91,13 @@ FILE fqName: fileName:/C.kt FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:.E VALUE_PARAMETER name:value index:0 type:kotlin.String SYNTHETIC_BODY kind=ENUM_VALUEOF - CLASS ANNOTATION_CLASS name:Annos modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Annos modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Annos CONSTRUCTOR visibility:public <> (value:kotlin.Array<.Anno>) returnType:.Annos [primary] VALUE_PARAMETER name:value index:0 type:kotlin.Array<.Anno> + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Annos modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:value visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Array<.Anno> visibility:private [final] EXPRESSION_BODY @@ -116,10 +122,13 @@ FILE fqName: fileName:/C.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:Strings modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Strings modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Strings CONSTRUCTOR visibility:public <> (value:kotlin.Array) returnType:.Strings [primary] VALUE_PARAMETER name:value index:0 type:kotlin.Array + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Strings modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:value visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Array visibility:private [final] EXPRESSION_BODY @@ -144,10 +153,13 @@ FILE fqName: fileName:/C.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:Ints modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Ints modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Ints CONSTRUCTOR visibility:public <> (value:kotlin.IntArray) returnType:.Ints [primary] VALUE_PARAMETER name:value index:0 type:kotlin.IntArray + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Ints modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:value visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.IntArray visibility:private [final] EXPRESSION_BODY @@ -172,10 +184,13 @@ FILE fqName: fileName:/C.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:Enums modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Enums modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Enums CONSTRUCTOR visibility:public <> (value:kotlin.Array<.E>) returnType:.Enums [primary] VALUE_PARAMETER name:value index:0 type:kotlin.Array<.E> + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Enums modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:value visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Array<.E> visibility:private [final] EXPRESSION_BODY @@ -200,10 +215,13 @@ FILE fqName: fileName:/C.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:Classes modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Classes modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Classes CONSTRUCTOR visibility:public <> (value:kotlin.Array>) returnType:.Classes [primary] VALUE_PARAMETER name:value index:0 type:kotlin.Array> + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Classes modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:value visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Array> visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.fir.kt.txt b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.fir.kt.txt index 996e6c558a6..cef369506fb 100644 --- a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.fir.kt.txt @@ -1,5 +1,10 @@ -annotation class A : Annotation { - constructor(x: String) /* primary */ +open annotation class A : Annotation { + constructor(x: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: String field = x get diff --git a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.fir.txt index c4944e0938b..12d49d97356 100644 --- a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.fir.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/localDelegatedPropertiesWithAnnotations.kt - CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:.A [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.kt.txt index 9a32e4b7676..9c5cfa0c531 100644 --- a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.kt.txt @@ -1,5 +1,10 @@ -annotation class A : Annotation { - constructor(x: String) /* primary */ +open annotation class A : Annotation { + constructor(x: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: String field = x get @@ -18,4 +23,3 @@ fun foo(m: Map) { } } - diff --git a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt index bd1fd42e290..ea07894177a 100644 --- a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/localDelegatedPropertiesWithAnnotations.kt - CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:.A [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.kt.txt b/compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.kt.txt index 6c0bec81547..b8afb297250 100644 --- a/compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.kt.txt @@ -1,15 +1,27 @@ -annotation class A1 : Annotation { - constructor() /* primary */ +open annotation class A1 : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } -annotation class A2 : Annotation { - constructor() /* primary */ +open annotation class A2 : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } -annotation class A3 : Annotation { - constructor() /* primary */ +open annotation class A3 : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } @@ -18,4 +30,3 @@ annotation class A3 : Annotation { @A3 fun test() { } - diff --git a/compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.txt b/compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.txt index 6c16db2e7fb..3e63c81ecd4 100644 --- a/compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.txt +++ b/compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.txt @@ -1,7 +1,10 @@ FILE fqName: fileName:/multipleAnnotationsInSquareBrackets.kt - CLASS ANNOTATION_CLASS name:A1 modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A1 modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A1 CONSTRUCTOR visibility:public <> () returnType:.A1 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:A1 modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation @@ -15,9 +18,12 @@ FILE fqName: fileName:/multipleAnnotationsInSquareBrackets.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:A2 modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A2 modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A2 CONSTRUCTOR visibility:public <> () returnType:.A2 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:A2 modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation @@ -31,9 +37,12 @@ FILE fqName: fileName:/multipleAnnotationsInSquareBrackets.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:A3 modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A3 modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A3 CONSTRUCTOR visibility:public <> () returnType:.A3 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:A3 modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation diff --git a/compiler/testData/ir/irText/declarations/annotations/primaryConstructorParameterWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/primaryConstructorParameterWithAnnotations.kt.txt index 314dca9738d..e58a3dbc829 100644 --- a/compiler/testData/ir/irText/declarations/annotations/primaryConstructorParameterWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/primaryConstructorParameterWithAnnotations.kt.txt @@ -1,5 +1,9 @@ -annotation class Ann : Annotation { - constructor() /* primary */ +open annotation class Ann : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } @@ -15,4 +19,3 @@ class Test { get } - diff --git a/compiler/testData/ir/irText/declarations/annotations/primaryConstructorParameterWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/primaryConstructorParameterWithAnnotations.txt index 43725101953..1189e2a9f5e 100644 --- a/compiler/testData/ir/irText/declarations/annotations/primaryConstructorParameterWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/primaryConstructorParameterWithAnnotations.txt @@ -1,7 +1,10 @@ FILE fqName: fileName:/primaryConstructorParameterWithAnnotations.kt - CLASS ANNOTATION_CLASS name:Ann modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Ann modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Ann CONSTRUCTOR visibility:public <> () returnType:.Ann [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Ann modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation diff --git a/compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.kt.txt index e9e9b8d906e..15ae5cfee05 100644 --- a/compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.kt.txt @@ -1,5 +1,10 @@ -annotation class TestAnn : Annotation { - constructor(x: String) /* primary */ +open annotation class TestAnn : Annotation { + constructor(x: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: String field = x get @@ -10,4 +15,3 @@ annotation class TestAnn : Annotation { val testVal: String field = "" get - diff --git a/compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.txt index 6ff32d469d3..845efe7bbf8 100644 --- a/compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/propertiesWithAnnotations.kt - CLASS ANNOTATION_CLASS name:TestAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnn CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:.TestAnn [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.kt.txt index 714ac0e7f4d..d8410cf5bde 100644 --- a/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.kt.txt @@ -1,5 +1,10 @@ -annotation class A : Annotation { - constructor(x: String) /* primary */ +open annotation class A : Annotation { + constructor(x: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: String field = x get @@ -26,4 +31,3 @@ class C { set } - diff --git a/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.txt index 032fdbaca25..9d3ad043ff5 100644 --- a/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/propertyAccessorsFromClassHeaderWithAnnotations.kt - CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:.A [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.kt.txt index 1a6bd5bda32..aa1b30a46a1 100644 --- a/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.kt.txt @@ -1,5 +1,10 @@ -annotation class TestAnn : Annotation { - constructor(x: String) /* primary */ +open annotation class TestAnn : Annotation { + constructor(x: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: String field = x get @@ -32,4 +37,3 @@ var test4: String get @TestAnn(x = "test4.set") set - diff --git a/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.txt index 66ab62410ea..362b86d47be 100644 --- a/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/propertyAccessorsWithAnnotations.kt - CLASS ANNOTATION_CLASS name:TestAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnn CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:.TestAnn [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/propertySetterParameterWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/propertySetterParameterWithAnnotations.kt.txt index 1db19eec87e..669fcd29eec 100644 --- a/compiler/testData/ir/irText/declarations/annotations/propertySetterParameterWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/propertySetterParameterWithAnnotations.kt.txt @@ -1,5 +1,9 @@ -annotation class AnnParam : Annotation { - constructor() /* primary */ +open annotation class AnnParam : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } @@ -21,4 +25,3 @@ class C { set } - diff --git a/compiler/testData/ir/irText/declarations/annotations/propertySetterParameterWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/propertySetterParameterWithAnnotations.txt index 0e443533548..07150d568d8 100644 --- a/compiler/testData/ir/irText/declarations/annotations/propertySetterParameterWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/propertySetterParameterWithAnnotations.txt @@ -1,7 +1,10 @@ FILE fqName: fileName:/propertySetterParameterWithAnnotations.kt - CLASS ANNOTATION_CLASS name:AnnParam modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:AnnParam modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.AnnParam CONSTRUCTOR visibility:public <> () returnType:.AnnParam [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:AnnParam modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation diff --git a/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.fir.kt.txt b/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.fir.kt.txt index a3fb025d70e..10baa5f003e 100644 --- a/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.fir.kt.txt @@ -1,5 +1,9 @@ -annotation class Ann : Annotation { - constructor() /* primary */ +open annotation class Ann : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } diff --git a/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.fir.txt index 28baf8774c9..22b3fb9caf3 100644 --- a/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.fir.txt @@ -1,7 +1,10 @@ FILE fqName: fileName:/receiverParameterWithAnnotations.kt - CLASS ANNOTATION_CLASS name:Ann modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Ann modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Ann CONSTRUCTOR visibility:public <> () returnType:.Ann [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Ann modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation diff --git a/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.kt.txt index 198a977fa67..92ca5034a43 100644 --- a/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.kt.txt @@ -1,5 +1,9 @@ -annotation class Ann : Annotation { - constructor() /* primary */ +open annotation class Ann : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } @@ -29,4 +33,3 @@ val String.topLevelP: String get(): String { return "" } - diff --git a/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.txt index e10330ac13e..fcce2660955 100644 --- a/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.txt @@ -1,7 +1,10 @@ FILE fqName: fileName:/receiverParameterWithAnnotations.kt - CLASS ANNOTATION_CLASS name:Ann modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Ann modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Ann CONSTRUCTOR visibility:public <> () returnType:.Ann [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Ann modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation diff --git a/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.fir.kt.txt b/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.fir.kt.txt index 72a0ed3bd66..792f0c2e61d 100644 --- a/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.fir.kt.txt @@ -1,5 +1,10 @@ -annotation class A : Annotation { - constructor(vararg xs: String) /* primary */ +open annotation class A : Annotation { + constructor(vararg xs: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val xs: Array field = xs get diff --git a/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.fir.txt b/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.fir.txt index 6d7221b37dc..c7819205a98 100644 --- a/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.fir.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/spreadOperatorInAnnotationArguments.kt - CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A CONSTRUCTOR visibility:public <> (xs:kotlin.Array) returnType:.A [primary] VALUE_PARAMETER name:xs index:0 type:kotlin.Array varargElementType:kotlin.String [vararg] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:xs visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.kt.txt b/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.kt.txt index acb5cbbf55f..7f8c257a5fe 100644 --- a/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.kt.txt @@ -1,5 +1,10 @@ -annotation class A : Annotation { - constructor(vararg xs: String) /* primary */ +open annotation class A : Annotation { + constructor(vararg xs: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val xs: Array field = xs get @@ -9,4 +14,3 @@ annotation class A : Annotation { @A(xs = [["a"], ["b"]]) fun test() { } - diff --git a/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.txt b/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.txt index def197c8ad7..b37b8de7f98 100644 --- a/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.txt +++ b/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/spreadOperatorInAnnotationArguments.kt - CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A CONSTRUCTOR visibility:public <> (xs:kotlin.Array) returnType:.A [primary] VALUE_PARAMETER name:xs index:0 type:kotlin.Array varargElementType:kotlin.String [vararg] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:xs visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.fir.kt.txt b/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.fir.kt.txt index fca88dbbc9c..db1f22605f7 100644 --- a/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.fir.kt.txt @@ -1,8 +1,13 @@ @TestAnn(x = "TestTypeAlias") typealias TestTypeAlias = String @Target(allowedTargets = [AnnotationTarget.TYPEALIAS]) -annotation class TestAnn : Annotation { - constructor(x: String) /* primary */ +open annotation class TestAnn : Annotation { + constructor(x: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: String field = x get diff --git a/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.fir.txt index 4e2b96758a1..a65b2317da2 100644 --- a/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.fir.txt @@ -2,12 +2,15 @@ FILE fqName: fileName:/typeAliasesWithAnnotations.kt TYPEALIAS name:TestTypeAlias visibility:public expandedType:kotlin.String annotations: TestAnn(x = 'TestTypeAlias') - CLASS ANNOTATION_CLASS name:TestAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] annotations: Target(allowedTargets = [GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:TYPEALIAS' type=kotlin.annotation.AnnotationTarget]) $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnn CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:.TestAnn [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.kt.txt index efd5dd8a31b..7c210eb936e 100644 --- a/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.kt.txt @@ -1,6 +1,11 @@ @Target(allowedTargets = [AnnotationTarget.TYPEALIAS]) -annotation class TestAnn : Annotation { - constructor(x: String) /* primary */ +open annotation class TestAnn : Annotation { + constructor(x: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: String field = x get diff --git a/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.txt index d070235b774..230c38d7c4d 100644 --- a/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.txt @@ -1,10 +1,13 @@ FILE fqName: fileName:/typeAliasesWithAnnotations.kt - CLASS ANNOTATION_CLASS name:TestAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] annotations: Target(allowedTargets = [GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:TYPEALIAS' type=kotlin.annotation.AnnotationTarget]) $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnn CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:.TestAnn [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.kt.txt index fbe44f28b87..3718d5adf94 100644 --- a/compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.kt.txt @@ -1,9 +1,12 @@ @Target(allowedTargets = [AnnotationTarget.TYPE_PARAMETER]) -annotation class Anno : Annotation { - constructor() /* primary */ +open annotation class Anno : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } fun <@Anno T : Any?> foo() { } - diff --git a/compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.txt index fd15036d1cb..6ac3adb1ca2 100644 --- a/compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.txt @@ -1,9 +1,12 @@ FILE fqName: fileName:/typeParametersWithAnnotations.kt - CLASS ANNOTATION_CLASS name:Anno modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Anno modality:OPEN visibility:public superTypes:[kotlin.Annotation] annotations: Target(allowedTargets = [GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:TYPE_PARAMETER' type=kotlin.annotation.AnnotationTarget]) $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Anno CONSTRUCTOR visibility:public <> () returnType:.Anno [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Anno modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation diff --git a/compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.kt.txt index 14e455635e8..081cf455943 100644 --- a/compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.kt.txt @@ -1,5 +1,10 @@ -annotation class TestAnn : Annotation { - constructor(x: String) /* primary */ +open annotation class TestAnn : Annotation { + constructor(x: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: String field = x get @@ -21,4 +26,3 @@ class TestClassConstructor1 { get } - diff --git a/compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.txt index a9ee6fc6f8c..ce9e826580e 100644 --- a/compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/valueParametersWithAnnotations.kt - CLASS ANNOTATION_CLASS name:TestAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnn CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:.TestAnn [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.kt.txt b/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.kt.txt index 402a6bfe286..487d5addbaa 100644 --- a/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.kt.txt @@ -1,21 +1,36 @@ -annotation class A1 : Annotation { - constructor(vararg xs: Int) /* primary */ +open annotation class A1 : Annotation { + constructor(vararg xs: Int) /* primary */ { + super/*Any*/() + /* () */ + + } + val xs: IntArray field = xs get } -annotation class A2 : Annotation { - constructor(vararg xs: String) /* primary */ +open annotation class A2 : Annotation { + constructor(vararg xs: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val xs: Array field = xs get } -annotation class AA : Annotation { - constructor(vararg xs: A1) /* primary */ +open annotation class AA : Annotation { + constructor(vararg xs: A1) /* primary */ { + super/*Any*/() + /* () */ + + } + val xs: Array field = xs get @@ -33,4 +48,3 @@ fun test1() { @AA(xs = []) fun test2() { } - diff --git a/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.txt b/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.txt index 2ec913fd159..2f8f0612ae8 100644 --- a/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.txt +++ b/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/varargsInAnnotationArguments.kt - CLASS ANNOTATION_CLASS name:A1 modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A1 modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A1 CONSTRUCTOR visibility:public <> (xs:kotlin.IntArray) returnType:.A1 [primary] 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' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:A1 modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:xs visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.IntArray visibility:private [final] EXPRESSION_BODY @@ -27,10 +30,13 @@ FILE fqName: fileName:/varargsInAnnotationArguments.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:A2 modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:A2 modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A2 CONSTRUCTOR visibility:public <> (xs:kotlin.Array) returnType:.A2 [primary] VALUE_PARAMETER name:xs index:0 type:kotlin.Array varargElementType:kotlin.String [vararg] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:A2 modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:xs visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array visibility:private [final] EXPRESSION_BODY @@ -55,10 +61,13 @@ FILE fqName: fileName:/varargsInAnnotationArguments.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:AA modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:AA modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.AA CONSTRUCTOR visibility:public <> (xs:kotlin.Array.A1>) returnType:.AA [primary] VALUE_PARAMETER name:xs index:0 type:kotlin.Array.A1> varargElementType:.A1 [vararg] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:AA modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:xs visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array.A1> visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.kt.txt index dce3071fe44..095fccbc585 100644 --- a/compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.kt.txt @@ -1,5 +1,10 @@ -annotation class TestAnn : Annotation { - constructor(x: String) /* primary */ +open annotation class TestAnn : Annotation { + constructor(x: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val x: String field = x get @@ -12,4 +17,3 @@ fun foo() { @TestAnn(x = "foo/testVar") var testVar: String = "testVar" } - diff --git a/compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.txt index 14c745ada3e..bf419a25be7 100644 --- a/compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/variablesWithAnnotations.kt - CLASS ANNOTATION_CLASS name:TestAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnn CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:.TestAnn [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:x visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions.kt.txt b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions.kt.txt index 6adfd3c2011..7773f4d600f 100644 --- a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions.kt.txt +++ b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions.kt.txt @@ -1,8 +1,12 @@ // FILE: signedToUnsignedConversions_annotation.kt package kotlin.internal -annotation class ImplicitIntegerCoercion : Annotation { - constructor() /* primary */ +open annotation class ImplicitIntegerCoercion : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } @@ -65,4 +69,3 @@ fun test() { takeULong(u = ().toULong()) takeUBytes(u = [().toUByte(), ().toUByte(), 42B]) } - diff --git a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions.txt b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions.txt index 3c0815c6b4e..c39c3b00880 100644 --- a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions.txt +++ b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions.txt @@ -1,7 +1,10 @@ FILE fqName:kotlin.internal fileName:/signedToUnsignedConversions_annotation.kt - CLASS ANNOTATION_CLASS name:ImplicitIntegerCoercion modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:ImplicitIntegerCoercion modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:kotlin.internal.ImplicitIntegerCoercion CONSTRUCTOR visibility:public <> () returnType:kotlin.internal.ImplicitIntegerCoercion [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:ImplicitIntegerCoercion modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation diff --git a/compiler/testData/ir/irText/firProblems/AnnotationInAnnotation.kt.txt b/compiler/testData/ir/irText/firProblems/AnnotationInAnnotation.kt.txt index e623affd366..aa4d0f4ab3d 100644 --- a/compiler/testData/ir/irText/firProblems/AnnotationInAnnotation.kt.txt +++ b/compiler/testData/ir/irText/firProblems/AnnotationInAnnotation.kt.txt @@ -1,13 +1,23 @@ -annotation class Storage : Annotation { - constructor(value: String) /* primary */ +open annotation class Storage : Annotation { + constructor(value: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val value: String field = value get } -annotation class State : Annotation { - constructor(name: String, storages: Array) /* primary */ +open annotation class State : Annotation { + constructor(name: String, storages: Array) /* primary */ { + super/*Any*/() + /* () */ + + } + val name: String field = name get @@ -27,4 +37,3 @@ class Test { } } - diff --git a/compiler/testData/ir/irText/firProblems/AnnotationInAnnotation.txt b/compiler/testData/ir/irText/firProblems/AnnotationInAnnotation.txt index 171c725e01f..a89838f66f1 100644 --- a/compiler/testData/ir/irText/firProblems/AnnotationInAnnotation.txt +++ b/compiler/testData/ir/irText/firProblems/AnnotationInAnnotation.txt @@ -1,8 +1,11 @@ FILE fqName: fileName:/AnnotationInAnnotation.kt - CLASS ANNOTATION_CLASS name:Storage modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:Storage modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Storage CONSTRUCTOR visibility:public <> (value:kotlin.String) returnType:.Storage [primary] VALUE_PARAMETER name:value index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Storage modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:value visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:private [final] EXPRESSION_BODY @@ -27,11 +30,14 @@ FILE fqName: fileName:/AnnotationInAnnotation.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:State modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:State modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.State CONSTRUCTOR visibility:public <> (name:kotlin.String, storages:kotlin.Array<.Storage>) returnType:.State [primary] VALUE_PARAMETER name:name index:0 type:kotlin.String VALUE_PARAMETER name:storages index:1 type:kotlin.Array<.Storage> + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:State modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:name visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:name type:kotlin.String visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/firProblems/TypeParameterBounds.kt.txt b/compiler/testData/ir/irText/firProblems/TypeParameterBounds.kt.txt index 42ca3c35d2d..59db3f311af 100644 --- a/compiler/testData/ir/irText/firProblems/TypeParameterBounds.kt.txt +++ b/compiler/testData/ir/irText/firProblems/TypeParameterBounds.kt.txt @@ -1,6 +1,11 @@ @Target(allowedTargets = [AnnotationTarget.TYPE]) -annotation class TypeAnn : Annotation { - constructor(name: String) /* primary */ +open annotation class TypeAnn : Annotation { + constructor(name: String) /* primary */ { + super/*Any*/() + /* () */ + + } + val name: String field = name get @@ -8,15 +13,23 @@ annotation class TypeAnn : Annotation { } @Target(allowedTargets = [AnnotationTarget.TYPE_PARAMETER]) -annotation class TypeParameterAnn : Annotation { - constructor() /* primary */ +open annotation class TypeParameterAnn : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } @Target(allowedTargets = [AnnotationTarget.TYPE_PARAMETER]) @Retention(value = AnnotationRetention.BINARY) -annotation class TypeParameterAnnBinary : Annotation { - constructor() /* primary */ +open annotation class TypeParameterAnnBinary : Annotation { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } } diff --git a/compiler/testData/ir/irText/firProblems/TypeParameterBounds.txt b/compiler/testData/ir/irText/firProblems/TypeParameterBounds.txt index 37acc90b254..cbbe0552f47 100644 --- a/compiler/testData/ir/irText/firProblems/TypeParameterBounds.txt +++ b/compiler/testData/ir/irText/firProblems/TypeParameterBounds.txt @@ -1,10 +1,13 @@ FILE fqName: fileName:/TypeParameterBounds.kt - CLASS ANNOTATION_CLASS name:TypeAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TypeAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] annotations: Target(allowedTargets = [GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:TYPE' type=kotlin.annotation.AnnotationTarget]) $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TypeAnn CONSTRUCTOR visibility:public <> (name:kotlin.String) returnType:.TypeAnn [primary] VALUE_PARAMETER name:name index:0 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TypeAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]' PROPERTY name:name visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:name type:kotlin.String visibility:private [final] EXPRESSION_BODY @@ -29,11 +32,14 @@ FILE fqName: fileName:/TypeParameterBounds.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:TypeParameterAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TypeParameterAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] annotations: Target(allowedTargets = [GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:TYPE_PARAMETER' type=kotlin.annotation.AnnotationTarget]) $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TypeParameterAnn CONSTRUCTOR visibility:public <> () returnType:.TypeParameterAnn [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TypeParameterAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation @@ -47,12 +53,15 @@ FILE fqName: fileName:/TypeParameterBounds.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS ANNOTATION_CLASS name:TypeParameterAnnBinary modality:FINAL visibility:public superTypes:[kotlin.Annotation] + CLASS ANNOTATION_CLASS name:TypeParameterAnnBinary modality:OPEN visibility:public superTypes:[kotlin.Annotation] annotations: Target(allowedTargets = [GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:TYPE_PARAMETER' type=kotlin.annotation.AnnotationTarget]) Retention(value = GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:BINARY' type=kotlin.annotation.AnnotationRetention) $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TypeParameterAnnBinary CONSTRUCTOR visibility:public <> () returnType:.TypeParameterAnnBinary [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TypeParameterAnnBinary modality:OPEN visibility:public superTypes:[kotlin.Annotation]' 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 [fake_override,operator] declared in kotlin.Annotation diff --git a/compiler/testData/ir/sourceRanges/declarations/classes.txt b/compiler/testData/ir/sourceRanges/declarations/classes.txt index 49514acb67b..2cb4c072d99 100644 --- a/compiler/testData/ir/sourceRanges/declarations/classes.txt +++ b/compiler/testData/ir/sourceRanges/declarations/classes.txt @@ -84,9 +84,12 @@ @-1:-1..-1 FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:.Test5 @-1:-1..-1 VALUE_PARAMETER name:value index:0 type:kotlin.String @-1:-1..-1 SYNTHETIC_BODY kind=ENUM_VALUEOF - @21:0..22:11 CLASS ANNOTATION_CLASS name:Test6 modality:FINAL visibility:public superTypes:[kotlin.Annotation] + @21:0..22:11 CLASS ANNOTATION_CLASS name:Test6 modality:OPEN visibility:public superTypes:[kotlin.Annotation] @21:0..22:11 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test6 @22:0..11 CONSTRUCTOR visibility:public <> () returnType:.Test6 [primary] + @21:0..22:11 BLOCK_BODY + @21:0..22:11 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + @21:0..22:11 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Test6 modality:OPEN visibility:public superTypes:[kotlin.Annotation]' @22:0..11 FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] @21:0..22:11 VALUE_PARAMETER name: type:kotlin.Any @22:0..11 VALUE_PARAMETER name:other index:0 type:kotlin.Any?