diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/descriptors/WrappedDescriptors.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/descriptors/WrappedDescriptors.kt index 144c31ab227..c5e9985dea9 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/descriptors/WrappedDescriptors.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/descriptors/WrappedDescriptors.kt @@ -48,8 +48,8 @@ abstract class WrappedDeclarationDescriptor(annotations: Anno Annotations.create(ownerAnnotations.map { it.toAnnotationDescriptor() }) } - private fun IrCall.toAnnotationDescriptor(): AnnotationDescriptor { - assert(symbol.owner is IrConstructor && symbol.owner.parentAsClass.isAnnotationClass) { + private fun IrConstructorCall.toAnnotationDescriptor(): AnnotationDescriptor { + assert(symbol.owner.parentAsClass.isAnnotationClass) { "Expected call to constructor of annotation class but was: ${this.dump()}" } return AnnotationDescriptorImpl( @@ -88,7 +88,7 @@ abstract class WrappedDeclarationDescriptor(annotations: Anno this is IrClassReference -> KClassValue(classType.classifierOrFail.descriptor.classId!!, /*TODO*/0) - this is IrCall -> AnnotationValue(this.toAnnotationDescriptor()) + this is IrConstructorCall -> AnnotationValue(this.toAnnotationDescriptor()) else -> error("$this is not expected: ${this.dump()}") } diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/CallGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/CallGenerator.kt index f76051c8852..c94d16a2f19 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/CallGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/CallGenerator.kt @@ -246,18 +246,11 @@ class CallGenerator(statementGenerator: StatementGenerator) : StatementGenerator ): IrExpression = call.callReceiver.call { dispatchReceiverValue, extensionReceiverValue -> val irType = constructorDescriptor.returnType.toIrType() - val classTypeParametersCount = constructorDescriptor.constructedClass.original.declaredTypeParameters.size - val totalTypeParametersCount = constructorDescriptor.typeParameters.size - - IrConstructorCallImpl( + IrConstructorCallImpl.fromSymbolDescriptor( startOffset, endOffset, irType, context.symbolTable.referenceConstructor(constructorDescriptor.original), - constructorDescriptor, - typeArgumentsCount = totalTypeParametersCount, - constructorTypeArgumentsCount = totalTypeParametersCount - classTypeParametersCount, - valueArgumentsCount = constructorDescriptor.valueParameters.size, - origin = origin + origin ).run { putTypeArguments(call.typeArguments) { it.toIrType() } dispatchReceiver = dispatchReceiverValue?.load() diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrAnnotationContainer.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrAnnotationContainer.kt index 860d8c8a494..b32a02c5116 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrAnnotationContainer.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrAnnotationContainer.kt @@ -5,8 +5,8 @@ package org.jetbrains.kotlin.ir.declarations -import org.jetbrains.kotlin.ir.expressions.IrCall +import org.jetbrains.kotlin.ir.expressions.IrConstructorCall interface IrAnnotationContainer { - val annotations: MutableList + val annotations: MutableList } \ No newline at end of file diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/impl/IrDeclarationBase.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/impl/IrDeclarationBase.kt index c2809da09c2..f762a4e58cc 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/impl/IrDeclarationBase.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/impl/IrDeclarationBase.kt @@ -22,6 +22,7 @@ import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent import org.jetbrains.kotlin.ir.declarations.MetadataSource import org.jetbrains.kotlin.ir.expressions.IrCall +import org.jetbrains.kotlin.ir.expressions.IrConstructorCall abstract class IrDeclarationBase( startOffset: Int, @@ -32,7 +33,7 @@ abstract class IrDeclarationBase( override lateinit var parent: IrDeclarationParent - override val annotations: MutableList = ArrayList() + override val annotations: MutableList = ArrayList() override val metadata: MetadataSource? get() = null diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/impl/IrFileImpl.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/impl/IrFileImpl.kt index b4ba215c136..918bdedd8fb 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/impl/IrFileImpl.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/impl/IrFileImpl.kt @@ -22,7 +22,7 @@ import org.jetbrains.kotlin.ir.SourceManager import org.jetbrains.kotlin.ir.declarations.IrDeclaration import org.jetbrains.kotlin.ir.declarations.IrFile import org.jetbrains.kotlin.ir.declarations.MetadataSource -import org.jetbrains.kotlin.ir.expressions.IrCall +import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.symbols.IrFileSymbol import org.jetbrains.kotlin.ir.symbols.impl.IrFileSymbolImpl import org.jetbrains.kotlin.ir.visitors.IrElementTransformer @@ -55,7 +55,7 @@ class IrFileImpl( override val declarations: MutableList = ArrayList() - override val annotations: MutableList = ArrayList() + override val annotations: MutableList = ArrayList() override var metadata: MetadataSource.File? = null diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyDeclarationBase.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyDeclarationBase.kt index 1934fb50bc7..83f3fa82769 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyDeclarationBase.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyDeclarationBase.kt @@ -14,6 +14,7 @@ import org.jetbrains.kotlin.ir.declarations.IrValueParameter import org.jetbrains.kotlin.ir.declarations.impl.IrDeclarationBase import org.jetbrains.kotlin.ir.declarations.impl.IrValueParameterImpl import org.jetbrains.kotlin.ir.expressions.IrCall +import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.util.DeclarationStubGenerator import org.jetbrains.kotlin.ir.util.TypeTranslator import org.jetbrains.kotlin.resolve.scopes.MemberScope @@ -50,7 +51,7 @@ abstract class IrLazyDeclarationBase( createLazyParent()!! } - override val annotations: MutableList by lazy { + override val annotations: MutableList by lazy { descriptor.annotations.map { typeTranslator.constantValueGenerator.generateAnnotationConstructorCall(it) }.toMutableList() diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/IrCallImpl.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/IrCallImpl.kt index 53ae18eaacc..3573fbf7f64 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/IrCallImpl.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/IrCallImpl.kt @@ -17,6 +17,7 @@ package org.jetbrains.kotlin.ir.expressions.impl import org.jetbrains.kotlin.descriptors.ClassDescriptor +import org.jetbrains.kotlin.descriptors.ConstructorDescriptor import org.jetbrains.kotlin.descriptors.FunctionDescriptor import org.jetbrains.kotlin.ir.expressions.IrCall import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin @@ -45,6 +46,12 @@ class IrCallImpl( ), IrCall { + init { + if (symbol is IrClassSymbol) { + throw AssertionError("Should be IrConstructorCall: $descriptor") + } + } + constructor( startOffset: Int, endOffset: Int, diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/IrConstructorCallImpl.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/IrConstructorCallImpl.kt index d1cfd7ee813..b038487c728 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/IrConstructorCallImpl.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/IrConstructorCallImpl.kt @@ -6,6 +6,7 @@ package org.jetbrains.kotlin.ir.expressions.impl import org.jetbrains.kotlin.descriptors.ClassConstructorDescriptor +import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol @@ -28,4 +29,52 @@ class IrConstructorCallImpl( override fun accept(visitor: IrElementVisitor, data: D): R = visitor.visitConstructorCall(this, data) -} \ No newline at end of file + + companion object { + fun fromSymbolDescriptor( + startOffset: Int, + endOffset: Int, + type: IrType, + constructorSymbol: IrConstructorSymbol, + origin: IrStatementOrigin? = null + ): IrConstructorCallImpl { + val constructorDescriptor = constructorSymbol.descriptor + val classTypeParametersCount = constructorDescriptor.constructedClass.original.declaredTypeParameters.size + val totalTypeParametersCount = constructorDescriptor.typeParameters.size + val valueParametersCount = constructorDescriptor.valueParameters.size + + return IrConstructorCallImpl( + startOffset, endOffset, + type, + constructorSymbol, + constructorDescriptor, + totalTypeParametersCount, + totalTypeParametersCount - classTypeParametersCount, + valueParametersCount, + origin + ) + } + + fun fromSymbolDescriptor( + type: IrType, + constructorSymbol: IrConstructorSymbol, + origin: IrStatementOrigin? = null + ): IrConstructorCallImpl { + val constructorDescriptor = constructorSymbol.descriptor + val classTypeParametersCount = constructorDescriptor.constructedClass.original.declaredTypeParameters.size + val totalTypeParametersCount = constructorDescriptor.typeParameters.size + val valueParametersCount = constructorDescriptor.valueParameters.size + + return IrConstructorCallImpl( + UNDEFINED_OFFSET, UNDEFINED_OFFSET, + type, + constructorSymbol, constructorDescriptor, + totalTypeParametersCount, + totalTypeParametersCount - classTypeParametersCount, + valueParametersCount, + origin + ) + } + } +} + diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/types/IrType.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/types/IrType.kt index e6f615a08b6..d058d5853fa 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/types/IrType.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/types/IrType.kt @@ -5,12 +5,12 @@ package org.jetbrains.kotlin.ir.types -import org.jetbrains.kotlin.ir.expressions.IrCall +import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol import org.jetbrains.kotlin.types.Variance interface IrType { - val annotations: List + val annotations: List /** * @return true if this type is equal to [other] symbolically. Note that this is NOT EQUIVALENT to the full type checking algorithm @@ -46,4 +46,4 @@ interface IrStarProjection : IrTypeArgument interface IrTypeProjection : IrTypeArgument { val variance: Variance val type: IrType -} +} \ No newline at end of file diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/types/impl/IrSimpleTypeImpl.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/types/impl/IrSimpleTypeImpl.kt index c15097abf74..6a3dbef5d7b 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/types/impl/IrSimpleTypeImpl.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/types/impl/IrSimpleTypeImpl.kt @@ -5,7 +5,7 @@ package org.jetbrains.kotlin.ir.types.impl -import org.jetbrains.kotlin.ir.expressions.IrCall +import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.symbols.FqNameEqualityChecker import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol import org.jetbrains.kotlin.ir.types.* @@ -17,14 +17,14 @@ class IrSimpleTypeImpl( override val classifier: IrClassifierSymbol, override val hasQuestionMark: Boolean, override val arguments: List, - annotations: List + annotations: List ) : IrTypeBase(kotlinType, annotations, Variance.INVARIANT), IrSimpleType, IrTypeProjection { constructor( classifier: IrClassifierSymbol, hasQuestionMark: Boolean, arguments: List, - annotations: List + annotations: List ) : this(null, classifier, hasQuestionMark, arguments, annotations) override fun equals(other: Any?): Boolean = diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/types/impl/IrTypeBase.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/types/impl/IrTypeBase.kt index e62e23e5ab8..af1283a9bd7 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/types/impl/IrTypeBase.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/types/impl/IrTypeBase.kt @@ -6,6 +6,7 @@ package org.jetbrains.kotlin.ir.types.impl import org.jetbrains.kotlin.ir.expressions.IrCall +import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.types.* import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.Variance @@ -13,7 +14,7 @@ import org.jetbrains.kotlin.utils.addToStdlib.safeAs abstract class IrTypeBase( val kotlinType: KotlinType?, - override val annotations: List, + override val annotations: List, override val variance: Variance ) : IrType, IrTypeProjection { override val type: IrType get() = this @@ -21,7 +22,7 @@ abstract class IrTypeBase( class IrErrorTypeImpl( kotlinType: KotlinType?, - annotations: List, + annotations: List, variance: Variance ) : IrTypeBase(kotlinType, annotations, variance), IrErrorType { override fun equals(other: Any?): Boolean = other is IrErrorTypeImpl @@ -31,7 +32,7 @@ class IrErrorTypeImpl( class IrDynamicTypeImpl( kotlinType: KotlinType?, - annotations: List, + annotations: List, variance: Variance ) : IrTypeBase(kotlinType, annotations, variance), IrDynamicType, IrTypeProjection { override fun equals(other: Any?): Boolean = other is IrDynamicTypeImpl @@ -52,7 +53,7 @@ object IrStarProjectionImpl : IrStarProjection { @Deprecated("Hack to temporary cover late type initialization") object IrUninitializedType : IrType { - override val annotations: List = emptyList() + override val annotations: List = emptyList() override fun equals(other: Any?): Boolean = this === other diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/AdditionalIrUtils.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/AdditionalIrUtils.kt index 76383e79615..b97743e9181 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/AdditionalIrUtils.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/AdditionalIrUtils.kt @@ -5,11 +5,12 @@ package org.jetbrains.kotlin.ir.util +import org.jetbrains.kotlin.descriptors.ClassKind import org.jetbrains.kotlin.ir.SourceManager import org.jetbrains.kotlin.ir.SourceRangeInfo import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET import org.jetbrains.kotlin.ir.declarations.* -import org.jetbrains.kotlin.ir.expressions.IrCall +import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name @@ -74,15 +75,15 @@ fun IrSimpleFunction.overrides(other: IrSimpleFunction): Boolean { return false } -private val IrCall.annotationClass - get() = (this.symbol.owner as IrConstructor).constructedClass +private val IrConstructorCall.annotationClass + get() = this.symbol.owner.constructedClass -fun List.hasAnnotation(fqName: FqName): Boolean = - this.any { it.annotationClass.fqNameSafe == fqName } +fun List.hasAnnotation(fqName: FqName): Boolean = + any { it.annotationClass.fqNameSafe == fqName } + +fun List.findAnnotation(fqName: FqName): IrConstructorCall? = + firstOrNull { it.annotationClass.fqNameSafe == fqName } -fun List.findAnnotation(fqName: FqName): IrCall? = this.firstOrNull { - it.annotationClass.fqNameSafe == fqName -} val IrDeclaration.fileEntry: SourceManager.FileEntry get() = parent.let { when (it) { diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/ConstantValueGenerator.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/ConstantValueGenerator.kt index 443d6a6bb74..88d05f17c58 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/ConstantValueGenerator.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/ConstantValueGenerator.kt @@ -11,6 +11,7 @@ import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor import org.jetbrains.kotlin.incremental.components.NoLookupLocation import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET import org.jetbrains.kotlin.ir.expressions.IrCall +import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.impl.* import org.jetbrains.kotlin.ir.types.classifierOrFail @@ -19,7 +20,6 @@ import org.jetbrains.kotlin.psi.psiUtil.startOffset import org.jetbrains.kotlin.resolve.DescriptorUtils import org.jetbrains.kotlin.resolve.constants.* import org.jetbrains.kotlin.resolve.source.PsiSourceElement -import org.jetbrains.kotlin.resolve.source.PsiSourceFile import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.typeUtil.builtIns import org.jetbrains.kotlin.utils.addToStdlib.safeAs @@ -73,7 +73,7 @@ class ConstantValueGenerator( is EnumValue -> { val enumEntryDescriptor = constantKtType.memberScope.getContributedClassifier(constantValue.enumEntryName, NoLookupLocation.FROM_BACKEND) - ?: throw AssertionError("No such enum entry ${constantValue.enumEntryName} in $constantType") + ?: throw AssertionError("No such enum entry ${constantValue.enumEntryName} in $constantType") if (enumEntryDescriptor !is ClassDescriptor) { throw AssertionError("Enum entry $enumEntryDescriptor should be a ClassDescriptor") } @@ -89,7 +89,7 @@ class ConstantValueGenerator( is KClassValue -> { val classifierKtType = constantValue.getArgumentType(moduleDescriptor) val classifierDescriptor = classifierKtType.constructor.declarationDescriptor - ?: throw AssertionError("Unexpected KClassValue: $classifierKtType") + ?: throw AssertionError("Unexpected KClassValue: $classifierKtType") IrClassReferenceImpl( startOffset, endOffset, @@ -103,29 +103,28 @@ class ConstantValueGenerator( } } - fun generateAnnotationConstructorCall(annotationDescriptor: AnnotationDescriptor): IrCall { + fun generateAnnotationConstructorCall(annotationDescriptor: AnnotationDescriptor): IrConstructorCall { val annotationType = annotationDescriptor.type val annotationClassDescriptor = annotationType.constructor.declarationDescriptor as? ClassDescriptor - ?: throw AssertionError("No declaration descriptor for annotation $annotationDescriptor") + ?: throw AssertionError("No declaration descriptor for annotation $annotationDescriptor") assert(DescriptorUtils.isAnnotationClass(annotationClassDescriptor)) { "Annotation class expected: $annotationClassDescriptor" } val primaryConstructorDescriptor = annotationClassDescriptor.unsubstitutedPrimaryConstructor - ?: annotationClassDescriptor.constructors.singleOrNull() - ?: throw AssertionError("No constructor for annotation class $annotationClassDescriptor") + ?: annotationClassDescriptor.constructors.singleOrNull() + ?: throw AssertionError("No constructor for annotation class $annotationClassDescriptor") val primaryConstructorSymbol = symbolTable.referenceConstructor(primaryConstructorDescriptor) val psi = annotationDescriptor.source.safeAs()?.psi val startOffset = psi?.takeUnless { it.containingFile.fileType.isBinary }?.startOffset ?: UNDEFINED_OFFSET val endOffset = psi?.takeUnless { it.containingFile.fileType.isBinary }?.endOffset ?: UNDEFINED_OFFSET - val irCall = IrCallImpl( + val irCall = IrConstructorCallImpl.fromSymbolDescriptor( startOffset, endOffset, annotationType.toIrType(), - primaryConstructorSymbol, primaryConstructorDescriptor, - typeArgumentsCount = 0 + primaryConstructorSymbol ) for (valueParameter in primaryConstructorDescriptor.valueParameters) { diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DeepCopyTypeRemapper.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DeepCopyTypeRemapper.kt index 9153b32ef31..acfc6ac6d6d 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DeepCopyTypeRemapper.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DeepCopyTypeRemapper.kt @@ -6,7 +6,7 @@ package org.jetbrains.kotlin.ir.util import org.jetbrains.kotlin.ir.declarations.IrTypeParametersContainer -import org.jetbrains.kotlin.ir.expressions.IrCall +import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.types.IrSimpleType import org.jetbrains.kotlin.ir.types.IrType import org.jetbrains.kotlin.ir.types.IrTypeProjection @@ -39,14 +39,15 @@ class DeepCopyTypeRemapper( } } - val annotations = type.annotations.map { it.transform(deepCopy, null) as IrCall } + val annotations = type.annotations.map { it.transform(deepCopy, null) as IrConstructorCall } return IrSimpleTypeImpl( null, symbolRemapper.getReferencedClassifier(type.classifier), type.hasQuestionMark, arguments, - annotations) + annotations + ) } } \ No newline at end of file diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DumpIrTree.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DumpIrTree.kt index 7df2f16b4f3..c512eebc3a5 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DumpIrTree.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DumpIrTree.kt @@ -99,8 +99,8 @@ class DumpIrTreeVisitor( } private fun dumpAnnotations(element: IrAnnotationContainer) { - element.annotations.dumpItems("annotations") { - element.annotations.dumpElements() + element.annotations.dumpItems("annotations") { irAnnotation: IrConstructorCall -> + printer.println(elementRenderer.renderAsAnnotation(irAnnotation)) } } @@ -164,7 +164,7 @@ class DumpIrTreeVisitor( dumpTypeArguments(expression) expression.dispatchReceiver?.accept(this, "\$this") expression.extensionReceiver?.accept(this, "\$receiver") - val valueParameterNames = expression.getValueParameterNames(expression.valueArgumentsCount) + val valueParameterNames = expression.getValueParameterNamesForDebug() for (index in 0 until expression.valueArgumentsCount) { expression.getValueArgument(index)?.accept(this, valueParameterNames[index]) } @@ -175,10 +175,14 @@ class DumpIrTreeVisitor( expression.dumpLabeledElementWith(data) { dumpTypeArguments(expression) expression.outerClassReceiver?.accept(this, "\$outer") - val valueParameterNames = expression.getValueParameterNames(expression.valueArgumentsCount) - for (index in 0 until expression.valueArgumentsCount) { - expression.getValueArgument(index)?.accept(this, valueParameterNames[index]) - } + dumpConstructorValueArguments(expression) + } + } + + private fun dumpConstructorValueArguments(expression: IrConstructorCall) { + val valueParameterNames = expression.getValueParameterNamesForDebug() + for (index in 0 until expression.valueArgumentsCount) { + expression.getValueArgument(index)?.accept(this, valueParameterNames[index]) } } @@ -208,15 +212,6 @@ class DumpIrTreeVisitor( else getPlaceholderParameterNames(expectedCount) - private fun IrMemberAccessExpression.getValueParameterNames(expectedCount: Int): List = - if (this is IrDeclarationReference && symbol.isBound) - symbol.owner.getValueParameterNames(expectedCount) - else - getPlaceholderParameterNames(expectedCount) - - private fun getPlaceholderParameterNames(expectedCount: Int) = - (1..expectedCount).map { "$it" } - private fun IrSymbolOwner.getTypeParameterNames(expectedCount: Int): List = if (this is IrTypeParametersContainer) { val typeParameters = if (this is IrConstructor) getFullTypeParametersList() else this.typeParameters @@ -230,18 +225,6 @@ class DumpIrTreeVisitor( getPlaceholderParameterNames(expectedCount) } - private fun IrSymbolOwner.getValueParameterNames(expectedCount: Int): List = - if (this is IrFunction) { - (0 until expectedCount).map { - if (it < valueParameters.size) - valueParameters[it].name.asString() - else - "${it + 1}" - } - } else { - getPlaceholderParameterNames(expectedCount) - } - private fun IrConstructor.getFullTypeParametersList(): List { val parentClass = try { parent as? IrClass ?: return typeParameters @@ -378,3 +361,24 @@ class DumpTreeFromSourceLineVisitor( element.acceptChildrenVoid(this) } } + +internal fun IrMemberAccessExpression.getValueParameterNamesForDebug(): List { + val expectedCount = valueArgumentsCount + return if (this is IrDeclarationReference && symbol.isBound) { + val owner = symbol.owner + if (owner is IrFunction) { + (0 until expectedCount).map { + if (it < owner.valueParameters.size) + owner.valueParameters[it].name.asString() + else + "${it + 1}" + } + } else { + getPlaceholderParameterNames(expectedCount) + } + } else + getPlaceholderParameterNames(expectedCount) +} + +internal fun getPlaceholderParameterNames(expectedCount: Int) = + (1..expectedCount).map { "$it" } diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt index be2040fb49e..6182fda43b5 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt @@ -299,7 +299,7 @@ tailrec fun IrElement.getPackageFragment(): IrPackageFragment? { } } -fun IrAnnotationContainer.getAnnotation(name: FqName) = +fun IrAnnotationContainer.getAnnotation(name: FqName): IrConstructorCall? = annotations.find { it.symbol.owner.parentAsClass.descriptor.fqNameSafe == name } diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt index 1b592dae6e9..4caf0c21204 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt @@ -39,6 +39,53 @@ class RenderIrElementVisitor : IrElementVisitor { fun renderSymbolReference(symbol: IrSymbol) = symbol.renderReference() + fun renderAsAnnotation(irAnnotation: IrConstructorCall): String = + StringBuilder().also { it.renderAsAnnotation(irAnnotation) }.toString() + + private fun StringBuilder.renderAsAnnotation(irAnnotation: IrConstructorCall) { + val annotationClassName = try { + irAnnotation.symbol.owner.parentAsClass.name.asString() + } catch (e: Exception) { + "" + } + append(annotationClassName) + + if (irAnnotation.valueArgumentsCount == 0) return + + val valueParameterNames = irAnnotation.getValueParameterNamesForDebug() + var first = true + append("(") + for (i in 0 until irAnnotation.valueArgumentsCount) { + if (first) { + first = false + } else { + append(", ") + } + append(valueParameterNames[i]) + append(" = ") + renderAsAnnotationArgument(irAnnotation.getValueArgument(i)) + } + append(")") + } + + private fun StringBuilder.renderAsAnnotationArgument(irElement: IrElement?) { + when (irElement) { + null -> append("") + is IrConstructorCall -> renderAsAnnotation(irElement) + is IrConst<*> -> { + append('\'') + append(irElement.value.toString()) + append('\'') + } + is IrVararg -> { + appendListWith(irElement.elements, "[", "]", ", ") { + renderAsAnnotationArgument(it) + } + } + else -> append(irElement.accept(this@RenderIrElementVisitor, null)) + } + } + private inline fun buildTrimEnd(fn: StringBuilder.() -> Unit): String = buildString(fn).trimEnd() @@ -82,11 +129,11 @@ class RenderIrElementVisitor : IrElementVisitor { } - private fun renderTypeAnnotations(annotations: List) = + private fun renderTypeAnnotations(annotations: List) = if (annotations.isEmpty()) "" else - annotations.joinToString(prefix = "", postfix = " ", separator = " ") { "@[${it.render()}]" } + annotations.joinToString(prefix = "", postfix = " ", separator = " ") { "@[${renderAsAnnotation(it)}]" } private fun IrSymbol.renderReference() = if (isBound) diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/TypeTranslator.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/TypeTranslator.kt index 333b823bf5d..c8aab108e97 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/TypeTranslator.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/TypeTranslator.kt @@ -13,6 +13,7 @@ import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor import org.jetbrains.kotlin.descriptors.annotations.Annotations import org.jetbrains.kotlin.ir.declarations.IrTypeParametersContainer import org.jetbrains.kotlin.ir.expressions.IrCall +import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.types.IrType import org.jetbrains.kotlin.ir.types.IrTypeProjection import org.jetbrains.kotlin.ir.types.impl.* @@ -131,7 +132,7 @@ class TypeTranslator( } - private fun translateTypeAnnotations(annotations: Annotations): List = + private fun translateTypeAnnotations(annotations: Annotations): List = annotations.map(constantValueGenerator::generateAnnotationConstructorCall) private fun translateTypeArguments(arguments: List) = diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrModuleDeserializer.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrModuleDeserializer.kt index 39dcd956344..515abd82faa 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrModuleDeserializer.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrModuleDeserializer.kt @@ -83,9 +83,9 @@ abstract class IrModuleDeserializer( } - fun deserializeAnnotations(annotations: KotlinIr.Annotations): List { + fun deserializeAnnotations(annotations: KotlinIr.Annotations): List { return annotations.annotationList.map { - deserializeCall(it, 0, 0, builtIns.unitType) // TODO: need a proper deserialization here + deserializeConstructorCall(it, 0, 0, builtIns.unitType) // TODO: need a proper deserialization here } } @@ -243,6 +243,19 @@ abstract class IrModuleDeserializer( return IrClassReferenceImpl(start, end, type, symbol, classType) } + private fun deserializeConstructorCall(proto: KotlinIr.IrConstructorCall, start: Int, end: Int, type: IrType): IrConstructorCall { + val symbol = deserializeIrSymbol(proto.symbol) as IrConstructorSymbol + return IrConstructorCallImpl( + start, end, type, + symbol, symbol.descriptor, + typeArgumentsCount = proto.memberAccess.typeArguments.typeArgumentCount, + constructorTypeArgumentsCount = proto.constructorTypeArgumentsCount, + valueArgumentsCount = proto.memberAccess.valueArgumentCount + ).also { + deserializeMemberAccessCommon(it, proto.memberAccess) + } + } + private fun deserializeCall(proto: KotlinIr.IrCall, start: Int, end: Int, type: IrType): IrCall { val symbol = deserializeIrSymbol(proto.symbol) as IrFunctionSymbol @@ -415,11 +428,11 @@ abstract class IrModuleDeserializer( val getter = if (proto.hasGetter()) deserializeIrSymbol(proto.getter) as IrSimpleFunctionSymbol else null val setter = if (proto.hasSetter()) deserializeIrSymbol(proto.setter) as IrSimpleFunctionSymbol else null val descriptor = - if (proto.hasDescriptorReference()) - deserializeDescriptorReference(proto.descriptorReference) as PropertyDescriptor - else - field?.descriptor as? WrappedPropertyDescriptor // If field's descriptor coincides with property's. - ?: getterToPropertyDescriptorMap.getOrPut(getter!!) { WrappedPropertyDescriptor() } + if (proto.hasDescriptorReference()) + deserializeDescriptorReference(proto.descriptorReference) as PropertyDescriptor + else + field?.descriptor as? WrappedPropertyDescriptor // If field's descriptor coincides with property's. + ?: getterToPropertyDescriptorMap.getOrPut(getter!!) { WrappedPropertyDescriptor() } val callable = IrPropertyReferenceImpl( start, end, type, @@ -573,10 +586,10 @@ abstract class IrModuleDeserializer( // we create the loop before deserializing the body, so that // IrBreak statements have something to put into 'loop' field. private fun deserializeDoWhile(proto: KotlinIr.IrDoWhile, start: Int, end: Int, type: IrType) = - deserializeLoop(proto.loop, deserializeLoopHeader(proto.loop.loopId) { IrDoWhileLoopImpl(start, end, type, null) }) + deserializeLoop(proto.loop, deserializeLoopHeader(proto.loop.loopId) { IrDoWhileLoopImpl(start, end, type, null) }) private fun deserializeWhile(proto: KotlinIr.IrWhile, start: Int, end: Int, type: IrType) = - deserializeLoop(proto.loop, deserializeLoopHeader(proto.loop.loopId) { IrWhileLoopImpl(start, end, type, null) }) + deserializeLoop(proto.loop, deserializeLoopHeader(proto.loop.loopId) { IrWhileLoopImpl(start, end, type, null) }) private fun deserializeDynamicMemberExpression(proto: KotlinIr.IrDynamicMemberExpression, start: Int, end: Int, type: IrType) = IrDynamicMemberExpressionImpl(start, end, type, deserializeString(proto.memberName), deserializeExpression(proto.receiver)) @@ -741,6 +754,8 @@ abstract class IrModuleDeserializer( -> deserializeDynamicMemberExpression(proto.dynamicMember, start, end, type) DYNAMIC_OPERATOR -> deserializeDynamicOperatorExpression(proto.dynamicOperator, start, end, type) + CONSTRUCTOR_CALL + -> deserializeConstructorCall(proto.constructorCall, start, end, type) OPERATION_NOT_SET -> error("Expression deserialization not implemented: ${proto.operationCase}") } @@ -834,20 +849,22 @@ abstract class IrModuleDeserializer( val symbol = deserializeIrSymbol(proto.symbol) as IrClassSymbol val modality = deserializeModality(proto.modality) - val clazz = symbolTable.declareClass(UNDEFINED_OFFSET, UNDEFINED_OFFSET, irrelevantOrigin, - symbol.descriptor, modality) { + val clazz = symbolTable.declareClass( + UNDEFINED_OFFSET, UNDEFINED_OFFSET, irrelevantOrigin, + symbol.descriptor, modality + ) { IrClassImpl( - start, end, origin, - it, - deserializeName(proto.name), - deserializeClassKind(proto.kind), - deserializeVisibility(proto.visibility), - modality, - proto.isCompanion, - proto.isInner, - proto.isData, - proto.isExternal, - proto.isInline + start, end, origin, + it, + deserializeName(proto.name), + deserializeClassKind(proto.kind), + deserializeVisibility(proto.visibility), + modality, + proto.isCompanion, + proto.isInner, + proto.isData, + proto.isExternal, + proto.isInline ) } @@ -901,19 +918,19 @@ abstract class IrModuleDeserializer( val symbol = deserializeIrSymbol(proto.symbol) as IrSimpleFunctionSymbol val function = symbolTable.declareSimpleFunction(UNDEFINED_OFFSET, UNDEFINED_OFFSET, irrelevantOrigin, - symbol.descriptor, { - IrFunctionImpl( - start, end, origin, it, - deserializeName(proto.base.name), - deserializeVisibility(proto.base.visibility), - deserializeModality(proto.modality), - deserializeIrType(proto.base.returnType), - proto.base.isInline, - proto.base.isExternal, - proto.isTailrec, - proto.isSuspend - ) - }) + symbol.descriptor, { + IrFunctionImpl( + start, end, origin, it, + deserializeName(proto.base.name), + deserializeVisibility(proto.base.visibility), + deserializeModality(proto.modality), + deserializeIrType(proto.base.returnType), + proto.base.isInline, + proto.base.isExternal, + proto.isTailrec, + proto.isSuspend + ) + }) deserializeIrFunctionBase(proto.base, function as IrFunctionBase, start, end, origin) val overridden = proto.overriddenList.map { deserializeIrSymbol(it) as IrSimpleFunctionSymbol } @@ -1010,19 +1027,19 @@ abstract class IrModuleDeserializer( val symbol = deserializeIrSymbol(proto.symbol) as IrConstructorSymbol val constructor = symbolTable.declareConstructor(UNDEFINED_OFFSET, UNDEFINED_OFFSET, irrelevantOrigin, - symbol.descriptor, { - IrConstructorImpl( - start, end, origin, - it, - deserializeName(proto.base.name), - deserializeVisibility(proto.base.visibility), - deserializeIrType(proto.base.returnType), - proto.base.isInline, - proto.base.isExternal, - proto.isPrimary - ) + symbol.descriptor, { + IrConstructorImpl( + start, end, origin, + it, + deserializeName(proto.base.name), + deserializeVisibility(proto.base.visibility), + deserializeIrType(proto.base.returnType), + proto.base.isInline, + proto.base.isExternal, + proto.isPrimary + ) - }) + }) deserializeIrFunctionBase(proto.base, constructor as IrFunctionBase, start, end, origin) return constructor @@ -1033,21 +1050,22 @@ abstract class IrModuleDeserializer( val symbol = deserializeIrSymbol(proto.symbol) as IrFieldSymbol val type = deserializeIrType(proto.type) val field = symbolTable.declareField(UNDEFINED_OFFSET, - UNDEFINED_OFFSET, - irrelevantOrigin, - symbol.descriptor, - type, - { IrFieldImpl( - start, end, origin, - it, - deserializeName(proto.name), - type, - deserializeVisibility(proto.visibility), - proto.isFinal, - proto.isExternal, - proto.isStatic - ) - } + UNDEFINED_OFFSET, + irrelevantOrigin, + symbol.descriptor, + type, + { + IrFieldImpl( + start, end, origin, + it, + deserializeName(proto.name), + type, + deserializeVisibility(proto.visibility), + proto.isFinal, + proto.isExternal, + proto.isStatic + ) + } ) val initializer = if (proto.hasInitializer()) deserializeExpression(proto.initializer) else null diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrModuleSerializer.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrModuleSerializer.kt index 3778ed9d4c6..c54cc7acc0c 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrModuleSerializer.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrModuleSerializer.kt @@ -173,10 +173,10 @@ open class IrModuleSerializer( Variance.INVARIANT -> KotlinIr.IrTypeVariance.INV } - fun serializeAnnotations(annotations: List): KotlinIr.Annotations { + fun serializeAnnotations(annotations: List): KotlinIr.Annotations { val proto = KotlinIr.Annotations.newBuilder() annotations.forEach { - proto.addAnnotation(serializeCall(it)) + proto.addAnnotation(serializeConstructorCall(it)) } return proto.build() } @@ -245,12 +245,12 @@ open class IrModuleSerializer( } // This is just IrType repacked as a data class, good to address a hash map. - data class IrTypeKey ( + data class IrTypeKey( val kind: IrTypeKind, val classifier: IrClassifierSymbol?, val hasQuestionMark: Boolean?, val arguments: List?, - val annotations: List + val annotations: List ) data class IrTypeArgumentKey ( @@ -399,6 +399,13 @@ open class IrModuleSerializer( return proto.build() } + private fun serializeConstructorCall(call: IrConstructorCall): KotlinIr.IrConstructorCall = + KotlinIr.IrConstructorCall.newBuilder().apply { + symbol = serializeIrSymbol(call.symbol) + constructorTypeArgumentsCount = call.constructorTypeArgumentsCount + memberAccess = serializeMemberAccessCommon(call) + }.build() + private fun serializeFunctionReference(callable: IrFunctionReference): KotlinIr.IrFunctionReference { val proto = KotlinIr.IrFunctionReference.newBuilder() .setSymbol(serializeIrSymbol(callable.symbol)) diff --git a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.txt b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.txt index 03638c97915..3c7f2541577 100644 --- a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.txt +++ b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.txt @@ -1,47 +1,47 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt CLASS CLASS name:A modality:FINAL visibility:public [data] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A - CONSTRUCTOR visibility:public <> (runA:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit>) returnType:.A [primary] - VALUE_PARAMETER name:runA index:0 type:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> + CONSTRUCTOR visibility:public <> (runA:@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit>) returnType:.A [primary] + VALUE_PARAMETER name:runA index:0 type:@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> EXPRESSION_BODY - BLOCK type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=LAMBDA + BLOCK type=@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.A, it:kotlin.String) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name: type:.A VALUE_PARAMETER name:it index:0 type:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (it: kotlin.String): kotlin.Unit declared in .A.' GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit - FUNCTION_REFERENCE 'local final fun (it: kotlin.String): kotlin.Unit declared in .A.' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=LAMBDA + FUNCTION_REFERENCE 'local final fun (it: kotlin.String): kotlin.Unit declared in .A.' type=@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=LAMBDA BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' PROPERTY name:runA visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:runA type:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> visibility:public [final] + FIELD PROPERTY_BACKING_FIELD name:runA type:@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> visibility:public [final] EXPRESSION_BODY - GET_VAR 'runA: @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A.' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.A) returnType:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> + GET_VAR 'runA: @[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A.' type=@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.A) returnType:@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> correspondingProperty: PROPERTY name:runA visibility:public modality:FINAL [val] $this: VALUE_PARAMETER name: type:.A BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:runA type:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> visibility:public [final] ' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=null + RETURN type=kotlin.Nothing from='public final fun (): @[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:runA type:@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> visibility:public [final] ' type=@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=null receiver: GET_VAR ': .A declared in .A.' type=.A origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:.A) returnType:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> + FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:.A) returnType:@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> $this: VALUE_PARAMETER name: type:.A BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component1 (): @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A' - CALL 'public final fun (): @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=GET_PROPERTY + RETURN type=kotlin.Nothing from='public final fun component1 (): @[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A' + CALL 'public final fun (): @[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A' type=@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=GET_PROPERTY $this: GET_VAR ': .A declared in .A.component1' type=.A origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:.A, runA:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit>) returnType:.A + FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:.A, runA:@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit>) returnType:.A $this: VALUE_PARAMETER name: type:.A - VALUE_PARAMETER name:runA index:0 type:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> + VALUE_PARAMETER name:runA index:0 type:@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> EXPRESSION_BODY - CALL 'public final fun (): @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=GET_PROPERTY + CALL 'public final fun (): @[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A' type=@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=GET_PROPERTY $this: GET_VAR ': .A declared in .A.copy' type=.A origin=null BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun copy (runA: @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit>): .A declared in .A' - CALL 'public constructor (runA: @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit>) [primary] declared in .A' type=.A origin=null - runA: GET_VAR 'runA: @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A.copy' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=null + RETURN type=kotlin.Nothing from='public final fun copy (runA: @[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit>): .A declared in .A' + CALL 'public constructor (runA: @[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit>) [primary] declared in .A' type=.A origin=null + runA: GET_VAR 'runA: @[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A.copy' type=@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=null FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.A) returnType:kotlin.String overridden: public open fun toString (): kotlin.String declared in kotlin.Any @@ -51,7 +51,7 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="A(" CONST String type=kotlin.String value="runA=" - CALL 'public final fun (): @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=GET_PROPERTY + CALL 'public final fun (): @[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A' type=@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=GET_PROPERTY $this: GET_VAR ': .A declared in .A.toString' type=.A origin=null CONST String type=kotlin.String value=")" FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.A) returnType:kotlin.Int @@ -63,7 +63,7 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt CONST Int type=kotlin.Int value=0 SET_VAR 'var tmp0_result: kotlin.Int [var] declared in .A.hashCode' type=kotlin.Unit origin=EQ CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Function2' type=kotlin.Int origin=null - $this: CALL 'public final fun (): @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=GET_PROPERTY + $this: CALL 'public final fun (): @[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A' type=@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=GET_PROPERTY $this: GET_VAR ': .A declared in .A.hashCode' type=.A origin=null RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .A' GET_VAR 'var tmp0_result: kotlin.Int [var] declared in .A.hashCode' type=kotlin.Int origin=null @@ -93,9 +93,9 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: CALL 'public final fun (): @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=GET_PROPERTY + arg0: CALL 'public final fun (): @[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A' type=@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=GET_PROPERTY $this: GET_VAR ': .A declared in .A.equals' type=.A origin=null - arg1: CALL 'public final fun (): @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=GET_PROPERTY + arg1: CALL 'public final fun (): @[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A' type=@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=GET_PROPERTY $this: GET_VAR 'val tmp0_other_with_cast: .A [val] declared in .A.equals' type=.A origin=null then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .A' CONST Boolean type=kotlin.Boolean value=false diff --git a/compiler/testData/ir/irText/declarations/annotations/annotationsInAnnotationArguments.txt b/compiler/testData/ir/irText/declarations/annotations/annotationsInAnnotationArguments.txt index 01017abf746..1f858e8a26c 100644 --- a/compiler/testData/ir/irText/declarations/annotations/annotationsInAnnotationArguments.txt +++ b/compiler/testData/ir/irText/declarations/annotations/annotationsInAnnotationArguments.txt @@ -85,22 +85,6 @@ FILE fqName: fileName:/annotationsInAnnotationArguments.kt $this: VALUE_PARAMETER name: type:kotlin.Any FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (a: .A1) [primary] declared in .A2' type=.A2 origin=null - a: CALL 'public constructor (x: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - x: CONST Int type=kotlin.Int value=42 - CALL 'public constructor (xs: kotlin.Array<.A1>) [primary] declared in .AA' type=.AA origin=null - xs: VARARG type=kotlin.Array<.A1> varargElementType=.A1 - CALL 'public constructor (x: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - x: CONST Int type=kotlin.Int value=1 - CALL 'public constructor (x: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - x: CONST Int type=kotlin.Int value=2 - CALL 'public constructor (a: .A1) [primary] declared in .A2' type=.A2 origin=null - a: CALL 'public constructor (x: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - x: CONST Int type=kotlin.Int value=42 - CALL 'public constructor (xs: kotlin.Array<.A1>) [primary] declared in .AA' type=.AA origin=null - xs: VARARG type=kotlin.Array<.A1> varargElementType=.A1 - CALL 'public constructor (x: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - x: CONST Int type=kotlin.Int value=1 - CALL 'public constructor (x: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - x: CONST Int type=kotlin.Int value=2 + A2(a = A1(x = '42')) + AA(xs = [A1(x = '1'), A1(x = '2')]) BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.txt b/compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.txt index 56c1bdd6396..e3a9ec847c5 100644 --- a/compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.txt +++ b/compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.txt @@ -45,26 +45,21 @@ FILE fqName: fileName:/annotationsWithDefaultParameterValues.kt $this: VALUE_PARAMETER name: type:kotlin.Any FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (x: kotlin.String, y: kotlin.Int) [primary] declared in .A' type=.A origin=null - x: CONST String type=kotlin.String value="abc" - y: CONST Int type=kotlin.Int value=123 + A(x = 'abc', y = '123') BLOCK_BODY FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (x: kotlin.String, y: kotlin.Int) [primary] declared in .A' type=.A origin=null - x: CONST String type=kotlin.String value="def" + A(x = 'def', y = ) BLOCK_BODY FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (x: kotlin.String, y: kotlin.Int) [primary] declared in .A' type=.A origin=null - x: CONST String type=kotlin.String value="ghi" + A(x = 'ghi', y = ) BLOCK_BODY FUN name:test4 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (x: kotlin.String, y: kotlin.Int) [primary] declared in .A' type=.A origin=null - y: CONST Int type=kotlin.Int value=456 + A(x = , y = '456') BLOCK_BODY FUN name:test5 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (x: kotlin.String, y: kotlin.Int) [primary] declared in .A' type=.A origin=null + A(x = , y = ) BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.txt b/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.txt index 757fe39bd41..a238966e9be 100644 --- a/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.txt +++ b/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.txt @@ -29,19 +29,13 @@ FILE fqName: fileName:/annotationsWithVarargParameters.kt $this: VALUE_PARAMETER name: type:kotlin.Any FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (vararg xs: kotlin.String) [primary] declared in .A' type=.A origin=null - xs: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value="abc" - CONST String type=kotlin.String value="def" + A(xs = ['abc', 'def']) BLOCK_BODY FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (vararg xs: kotlin.String) [primary] declared in .A' type=.A origin=null - xs: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value="abc" + A(xs = ['abc']) BLOCK_BODY FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (vararg xs: kotlin.String) [primary] declared in .A' type=.A origin=null - xs: VARARG type=kotlin.Array varargElementType=kotlin.String + A(xs = []) BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.txt b/compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.txt index 1e06e190a5f..5a1a7fdcc2d 100644 --- a/compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.txt +++ b/compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.txt @@ -57,47 +57,11 @@ FILE fqName: fileName:/arrayInAnnotationArguments.kt $this: VALUE_PARAMETER name: type:kotlin.Any FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (x: kotlin.IntArray) [primary] declared in .TestAnnWithIntArray' type=.TestAnnWithIntArray origin=null - x: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CONST Int type=kotlin.Int value=1 - CONST Int type=kotlin.Int value=2 - CONST Int type=kotlin.Int value=3 - CALL 'public constructor (x: kotlin.Array) [primary] declared in .TestAnnWithStringArray' type=.TestAnnWithStringArray origin=null - x: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value="a" - CONST String type=kotlin.String value="b" - CONST String type=kotlin.String value="c" - CALL 'public constructor (x: kotlin.IntArray) [primary] declared in .TestAnnWithIntArray' type=.TestAnnWithIntArray origin=null - x: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CONST Int type=kotlin.Int value=1 - CONST Int type=kotlin.Int value=2 - CONST Int type=kotlin.Int value=3 - CALL 'public constructor (x: kotlin.Array) [primary] declared in .TestAnnWithStringArray' type=.TestAnnWithStringArray origin=null - x: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value="a" - CONST String type=kotlin.String value="b" - CONST String type=kotlin.String value="c" + TestAnnWithIntArray(x = ['1', '2', '3']) + TestAnnWithStringArray(x = ['a', 'b', 'c']) BLOCK_BODY FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (x: kotlin.IntArray) [primary] declared in .TestAnnWithIntArray' type=.TestAnnWithIntArray origin=null - x: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CONST Int type=kotlin.Int value=4 - CONST Int type=kotlin.Int value=5 - CONST Int type=kotlin.Int value=6 - CALL 'public constructor (x: kotlin.Array) [primary] declared in .TestAnnWithStringArray' type=.TestAnnWithStringArray origin=null - x: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value="d" - CONST String type=kotlin.String value="e" - CONST String type=kotlin.String value="f" - CALL 'public constructor (x: kotlin.IntArray) [primary] declared in .TestAnnWithIntArray' type=.TestAnnWithIntArray origin=null - x: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CONST Int type=kotlin.Int value=4 - CONST Int type=kotlin.Int value=5 - CONST Int type=kotlin.Int value=6 - CALL 'public constructor (x: kotlin.Array) [primary] declared in .TestAnnWithStringArray' type=.TestAnnWithStringArray origin=null - x: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value="d" - CONST String type=kotlin.String value="e" - CONST String type=kotlin.String value="f" + TestAnnWithIntArray(x = ['4', '5', '6']) + TestAnnWithStringArray(x = ['d', 'e', 'f']) BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/classLiteralInAnnotation.txt b/compiler/testData/ir/irText/declarations/annotations/classLiteralInAnnotation.txt index dd0f2c8c84a..36b0e4d56e8 100644 --- a/compiler/testData/ir/irText/declarations/annotations/classLiteralInAnnotation.txt +++ b/compiler/testData/ir/irText/declarations/annotations/classLiteralInAnnotation.txt @@ -48,8 +48,7 @@ FILE fqName: fileName:/classLiteralInAnnotation.kt $this: VALUE_PARAMETER name: type:kotlin.Any FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (klass: kotlin.reflect.KClass<*>) [primary] declared in .A' type=.A origin=null - klass: CLASS_REFERENCE 'CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.reflect.KClass<.C> + A(klass = CLASS_REFERENCE 'CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.reflect.KClass<.C>) BLOCK_BODY FUN name:test2 visibility:public modality:FINAL () returnType:kotlin.Any [inline] TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] @@ -58,8 +57,7 @@ FILE fqName: fileName:/classLiteralInAnnotation.kt BLOCK type=.test2..test2> origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[kotlin.Any] annotations: - CALL 'public constructor (klass: kotlin.reflect.KClass<*>) [primary] declared in .A' type=.A origin=null - klass: CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public superTypes:[]' type=kotlin.reflect.KClass + A(klass = CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public superTypes:[]' type=kotlin.reflect.KClass) $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.test2..test2> CONSTRUCTOR visibility:public <> () returnType:.test2..test2> [primary] BLOCK_BODY @@ -89,8 +87,7 @@ FILE fqName: fileName:/classLiteralInAnnotation.kt BLOCK type=.. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[kotlin.Any] annotations: - CALL 'public constructor (klass: kotlin.reflect.KClass<*>) [primary] declared in .A' type=.A origin=null - klass: CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public superTypes:[]' type=kotlin.reflect.KClass + A(klass = CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public superTypes:[]' type=kotlin.reflect.KClass) $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.. CONSTRUCTOR visibility:public <> () returnType:.. [primary] BLOCK_BODY @@ -120,8 +117,7 @@ FILE fqName: fileName:/classLiteralInAnnotation.kt BLOCK type=.. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[kotlin.Any] annotations: - CALL 'public constructor (klass: kotlin.reflect.KClass<*>) [primary] declared in .A' type=.A origin=null - klass: CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public superTypes:[]' type=kotlin.reflect.KClass + A(klass = CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public superTypes:[]' type=kotlin.reflect.KClass) $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.. CONSTRUCTOR visibility:public <> () returnType:.. [primary] BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.txt index de4c512869a..5f8687c1a16 100644 --- a/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.txt @@ -29,8 +29,7 @@ FILE fqName: fileName:/classesWithAnnotations.kt $this: VALUE_PARAMETER name: type:kotlin.Any CLASS CLASS name:TestClass modality:FINAL visibility:public superTypes:[kotlin.Any] annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="class" + TestAnn(x = 'class') $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestClass CONSTRUCTOR visibility:public <> () returnType:.TestClass [primary] BLOCK_BODY @@ -51,8 +50,7 @@ FILE fqName: fileName:/classesWithAnnotations.kt $this: VALUE_PARAMETER name: type:kotlin.Any CLASS INTERFACE name:TestInterface modality:ABSTRACT visibility:public superTypes:[kotlin.Any] annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="interface" + TestAnn(x = 'interface') $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestInterface FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: @@ -69,8 +67,7 @@ FILE fqName: fileName:/classesWithAnnotations.kt $this: VALUE_PARAMETER name: type:kotlin.Any CLASS OBJECT name:TestObject modality:FINAL visibility:public superTypes:[kotlin.Any] annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="object" + TestAnn(x = 'object') $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestObject CONSTRUCTOR visibility:private <> () returnType:.TestObject [primary] BLOCK_BODY @@ -97,8 +94,7 @@ FILE fqName: fileName:/classesWithAnnotations.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' CLASS OBJECT name:TestCompanion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any] annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="companion" + TestAnn(x = 'companion') $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Host.TestCompanion CONSTRUCTOR visibility:private <> () returnType:.Host.TestCompanion [primary] BLOCK_BODY @@ -132,8 +128,7 @@ FILE fqName: fileName:/classesWithAnnotations.kt $this: VALUE_PARAMETER name: type:kotlin.Any CLASS ENUM_CLASS name:TestEnum modality:FINAL visibility:public superTypes:[kotlin.Enum<.TestEnum>] annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="enum" + TestAnn(x = 'enum') $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum CONSTRUCTOR visibility:private <> () returnType:.TestEnum [primary] BLOCK_BODY @@ -189,8 +184,7 @@ FILE fqName: fileName:/classesWithAnnotations.kt SYNTHETIC_BODY kind=ENUM_VALUEOF CLASS ANNOTATION_CLASS name:TestAnnotation modality:FINAL visibility:public superTypes:[kotlin.Annotation] annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="annotation" + TestAnn(x = 'annotation') $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnnotation CONSTRUCTOR visibility:public <> () returnType:.TestAnnotation [primary] FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean diff --git a/compiler/testData/ir/irText/declarations/annotations/constExpressionsInAnnotationArguments.txt b/compiler/testData/ir/irText/declarations/annotations/constExpressionsInAnnotationArguments.txt index 2a180f65a26..6a4087277b5 100644 --- a/compiler/testData/ir/irText/declarations/annotations/constExpressionsInAnnotationArguments.txt +++ b/compiler/testData/ir/irText/declarations/annotations/constExpressionsInAnnotationArguments.txt @@ -38,11 +38,9 @@ FILE fqName: fileName:/constExpressionsInAnnotationArguments.kt $this: VALUE_PARAMETER name: type:kotlin.Any FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (x: kotlin.Int) [primary] declared in .A' type=.A origin=null - x: CONST Int type=kotlin.Int value=1 + A(x = '1') BLOCK_BODY FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (x: kotlin.Int) [primary] declared in .A' type=.A origin=null - x: CONST Int type=kotlin.Int value=2 + A(x = '2') BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/constructorsWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/constructorsWithAnnotations.txt index 4fd7617a5a5..e57874e912a 100644 --- a/compiler/testData/ir/irText/declarations/annotations/constructorsWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/constructorsWithAnnotations.txt @@ -31,15 +31,13 @@ FILE fqName: fileName:/constructorsWithAnnotations.kt $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestClass CONSTRUCTOR visibility:public <> () returnType:.TestClass [primary] annotations: - CALL 'public constructor (x: kotlin.Int) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST Int type=kotlin.Int value=1 + TestAnn(x = '1') BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestClass modality:FINAL visibility:public superTypes:[kotlin.Any]' CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.TestClass annotations: - CALL 'public constructor (x: kotlin.Int) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST Int type=kotlin.Int value=2 + TestAnn(x = '2') VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .TestClass' diff --git a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt index 400bd2a45f8..265e51e88f3 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt @@ -18,7 +18,7 @@ FILE fqName: fileName:/delegateFieldWithAnnotations.kt PROPERTY name:test1 visibility:public modality:FINAL [delegated,val] FIELD DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static] annotations: - CALL 'public constructor () [primary] declared in .Ann' type=.Ann origin=null + Ann EXPRESSION_BODY CALL 'public final fun lazy (initializer: kotlin.Function0): kotlin.Lazy declared in kotlin' type=kotlin.Lazy origin=null : kotlin.Int diff --git a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.txt index 65b163d1896..7f1107a14c4 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.txt @@ -90,8 +90,7 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt value: CONST Int type=kotlin.Int value=1 FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .A' type=.A origin=null - x: CONST String type=kotlin.String value="test1.get" + A(x = 'test1.get') correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [delegated,val] BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' @@ -106,8 +105,7 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt value: CONST Int type=kotlin.Int value=2 FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .A' type=.A origin=null - x: CONST String type=kotlin.String value="test2.get" + A(x = 'test2.get') correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [delegated,var] BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' @@ -117,13 +115,11 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt kProp: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.Int) returnType:kotlin.Unit annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .A' type=.A origin=null - x: CONST String type=kotlin.String value="test2.set" + A(x = 'test2.set') correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [delegated,var] VALUE_PARAMETER name: index:0 type:kotlin.Int annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .A' type=.A origin=null - x: CONST String type=kotlin.String value="test2.set.param" + A(x = 'test2.set.param') BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (: kotlin.Int): kotlin.Unit declared in ' CALL 'public final fun setValue (thisRef: kotlin.Any?, kProp: kotlin.Any?, newValue: kotlin.Int): kotlin.Unit declared in .Cell' type=kotlin.Unit origin=null diff --git a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.txt index 797ec9d4444..8727b03a662 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.txt @@ -36,18 +36,15 @@ FILE fqName: fileName:/enumEntriesWithAnnotations.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnum modality:OPEN visibility:public superTypes:[kotlin.Enum<.TestEnum>]' ENUM_ENTRY name:ENTRY1 annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="ENTRY1" + TestAnn(x = 'ENTRY1') init: ENUM_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .TestEnum' ENUM_ENTRY name:ENTRY2 annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="ENTRY2" + TestAnn(x = 'ENTRY2') init: ENUM_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .TestEnum.ENTRY2' class: CLASS ENUM_ENTRY name:ENTRY2 modality:FINAL visibility:public superTypes:[.TestEnum] annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="ENTRY2" + TestAnn(x = 'ENTRY2') $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum.ENTRY2 CONSTRUCTOR visibility:private <> () returnType:.TestEnum.ENTRY2 [primary] BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.txt b/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.txt index 3715c02ce1c..8cb5656b887 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.txt @@ -91,6 +91,5 @@ FILE fqName: fileName:/enumsInAnnotationArguments.kt $this: VALUE_PARAMETER name: type:kotlin.Any FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (x: .En) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: GET_ENUM 'ENUM_ENTRY name:A' type=.En + TestAnn(x = GET_ENUM 'ENUM_ENTRY name:A' type=.En) BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.txt index ea73fb75603..23fc9da949b 100644 --- a/compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.txt @@ -30,8 +30,7 @@ FILE fqName: fileName:/fieldsWithAnnotations.kt PROPERTY name:testVal visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:testVal type:kotlin.String visibility:public [final,static] annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="testVal.field" + TestAnn(x = 'testVal.field') EXPRESSION_BODY CONST String type=kotlin.String value="a val" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String @@ -42,8 +41,7 @@ FILE fqName: fileName:/fieldsWithAnnotations.kt PROPERTY name:testVar visibility:public modality:FINAL [var] FIELD PROPERTY_BACKING_FIELD name:testVar type:kotlin.String visibility:public [static] annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="testVar.field" + TestAnn(x = 'testVar.field') EXPRESSION_BODY CONST String type=kotlin.String value="a var" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String diff --git a/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.txt index 0c3b0f0991e..7a4de15c791 100644 --- a/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.txt @@ -1,12 +1,9 @@ FILE fqName:test fileName:/fileAnnotations.kt annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in test.A' type=test.A origin=null - x: CONST String type=kotlin.String value="File annotation" + A(x = 'File annotation') CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Annotation] annotations: - CALL 'public constructor (vararg allowedTargets: kotlin.annotation.AnnotationTarget) [primary] declared in kotlin.annotation.Target' type=kotlin.annotation.Target origin=null - allowedTargets: VARARG type=kotlin.Array varargElementType=kotlin.annotation.AnnotationTarget - GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:FILE' type=kotlin.annotation.AnnotationTarget + 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 diff --git a/compiler/testData/ir/irText/declarations/annotations/functionsWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/functionsWithAnnotations.txt index 8fa5dc03aa3..3eb6860d981 100644 --- a/compiler/testData/ir/irText/declarations/annotations/functionsWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/functionsWithAnnotations.txt @@ -29,6 +29,5 @@ FILE fqName: fileName:/functionsWithAnnotations.kt $this: VALUE_PARAMETER name: type:kotlin.Any FUN name:testSimpleFunction visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (x: kotlin.Int) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST Int type=kotlin.Int value=42 + TestAnn(x = '42') BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/javaAnnotation.txt b/compiler/testData/ir/irText/declarations/annotations/javaAnnotation.txt index 278a1a1ca59..ba4058b5238 100644 --- a/compiler/testData/ir/irText/declarations/annotations/javaAnnotation.txt +++ b/compiler/testData/ir/irText/declarations/annotations/javaAnnotation.txt @@ -1,17 +1,13 @@ FILE fqName: fileName:/javaAnnotation.kt FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public/*package*/ constructor (value: kotlin.String, i: kotlin.Int) [primary] declared in .JavaAnn' type=.JavaAnn origin=null + JavaAnn(value = , i = ) BLOCK_BODY FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public/*package*/ constructor (value: kotlin.String, i: kotlin.Int) [primary] declared in .JavaAnn' type=.JavaAnn origin=null - value: CONST String type=kotlin.String value="abc" - i: CONST Int type=kotlin.Int value=123 + JavaAnn(value = 'abc', i = '123') BLOCK_BODY FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public/*package*/ constructor (value: kotlin.String, i: kotlin.Int) [primary] declared in .JavaAnn' type=.JavaAnn origin=null - value: CONST String type=kotlin.String value="abc" - i: CONST Int type=kotlin.Int value=123 + JavaAnn(value = 'abc', i = '123') BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt index 198fc34af7f..af8162988bc 100644 --- a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt @@ -32,8 +32,7 @@ FILE fqName: fileName:/localDelegatedPropertiesWithAnnotations.kt BLOCK_BODY LOCAL_DELEGATED_PROPERTY name:test type:kotlin.Int flags:val annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .A' type=.A origin=null - x: CONST String type=kotlin.String value="foo/test" + A(x = 'foo/test') VAR DELEGATE name:test$delegate type:kotlin.Lazy [val] CALL 'public final fun lazy (initializer: kotlin.Function0): kotlin.Lazy declared in kotlin' type=kotlin.Lazy origin=null : kotlin.Int diff --git a/compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.txt b/compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.txt index b285f63f01c..d338220f518 100644 --- a/compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.txt +++ b/compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.txt @@ -49,13 +49,7 @@ FILE fqName: fileName:/multipleAnnotationsInSquareBrackets.kt $this: VALUE_PARAMETER name: type:kotlin.Any FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor () [primary] declared in .A1' type=.A1 origin=null - CALL 'public constructor () [primary] declared in .A2' type=.A2 origin=null - CALL 'public constructor () [primary] declared in .A3' type=.A3 origin=null - CALL 'public constructor () [primary] declared in .A1' type=.A1 origin=null - CALL 'public constructor () [primary] declared in .A2' type=.A2 origin=null - CALL 'public constructor () [primary] declared in .A3' type=.A3 origin=null - CALL 'public constructor () [primary] declared in .A1' type=.A1 origin=null - CALL 'public constructor () [primary] declared in .A2' type=.A2 origin=null - CALL 'public constructor () [primary] declared in .A3' type=.A3 origin=null + A1 + A2 + A3 BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/primaryConstructorParameterWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/primaryConstructorParameterWithAnnotations.txt index 62d131d6a73..c46c672b59f 100644 --- a/compiler/testData/ir/irText/declarations/annotations/primaryConstructorParameterWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/primaryConstructorParameterWithAnnotations.txt @@ -20,7 +20,7 @@ FILE fqName: fileName:/primaryConstructorParameterWithAnnotations.kt CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.Test [primary] VALUE_PARAMETER name:x index:0 type:kotlin.Int annotations: - CALL 'public constructor () [primary] declared in .Ann' type=.Ann origin=null + Ann BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test modality:FINAL visibility:public superTypes:[kotlin.Any]' diff --git a/compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.txt index 0fd13ea9cba..7e289ea7694 100644 --- a/compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.txt @@ -29,8 +29,7 @@ FILE fqName: fileName:/propertiesWithAnnotations.kt $this: VALUE_PARAMETER name: type:kotlin.Any PROPERTY name:testVal visibility:public modality:FINAL [val] annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="testVal.property" + TestAnn(x = 'testVal.property') FIELD PROPERTY_BACKING_FIELD name:testVal type:kotlin.String visibility:public [final,static] EXPRESSION_BODY CONST String type=kotlin.String value="" diff --git a/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.txt index cddddd711ba..f83b911000c 100644 --- a/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.txt @@ -41,8 +41,7 @@ FILE fqName: fileName:/propertyAccessorsFromClassHeaderWithAnnotations.kt GET_VAR 'x: kotlin.Int declared in .C.' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C) returnType:kotlin.Int annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .A' type=.A origin=null - x: CONST String type=kotlin.String value="C.x.get" + A(x = 'C.x.get') correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] $this: VALUE_PARAMETER name: type:.C BLOCK_BODY @@ -55,8 +54,7 @@ FILE fqName: fileName:/propertyAccessorsFromClassHeaderWithAnnotations.kt GET_VAR 'y: kotlin.Int declared in .C.' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C) returnType:kotlin.Int annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .A' type=.A origin=null - x: CONST String type=kotlin.String value="C.y.get" + A(x = 'C.y.get') correspondingProperty: PROPERTY name:y visibility:public modality:FINAL [var] $this: VALUE_PARAMETER name: type:.C BLOCK_BODY @@ -65,8 +63,7 @@ FILE fqName: fileName:/propertyAccessorsFromClassHeaderWithAnnotations.kt receiver: GET_VAR ': .C declared in .C.' type=.C origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C, :kotlin.Int) returnType:kotlin.Unit annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .A' type=.A origin=null - x: CONST String type=kotlin.String value="C.y.set" + A(x = 'C.y.set') correspondingProperty: PROPERTY name:y visibility:public modality:FINAL [var] $this: VALUE_PARAMETER name: type:.C VALUE_PARAMETER name: index:0 type:kotlin.Int diff --git a/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.txt index 5b1c1020e67..d9b80337299 100644 --- a/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.txt @@ -30,8 +30,7 @@ FILE fqName: fileName:/propertyAccessorsWithAnnotations.kt PROPERTY name:test1 visibility:public modality:FINAL [val] FUN name: visibility:public modality:FINAL <> () returnType:kotlin.String annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="test1.get" + TestAnn(x = 'test1.get') correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val] BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' @@ -39,16 +38,14 @@ FILE fqName: fileName:/propertyAccessorsWithAnnotations.kt PROPERTY name:test2 visibility:public modality:FINAL [var] FUN name: visibility:public modality:FINAL <> () returnType:kotlin.String annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="test2.get" + TestAnn(x = 'test2.get') correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [var] BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' CONST String type=kotlin.String value="" FUN name: visibility:public modality:FINAL <> (value:kotlin.String) returnType:kotlin.Unit annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="test2.set" + TestAnn(x = 'test2.set') correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [var] VALUE_PARAMETER name:value index:0 type:kotlin.String BLOCK_BODY @@ -58,8 +55,7 @@ FILE fqName: fileName:/propertyAccessorsWithAnnotations.kt CONST String type=kotlin.String value="" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="test3.get" + TestAnn(x = 'test3.get') correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [val] BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' @@ -70,16 +66,14 @@ FILE fqName: fileName:/propertyAccessorsWithAnnotations.kt CONST String type=kotlin.String value="" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="test4.get" + TestAnn(x = 'test4.get') correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [var] BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test4 type:kotlin.String visibility:public [static] ' type=kotlin.String origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.String) returnType:kotlin.Unit annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="test4.set" + TestAnn(x = 'test4.set') correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [var] VALUE_PARAMETER name: index:0 type:kotlin.String BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/propertySetterParameterWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/propertySetterParameterWithAnnotations.txt index 7dc76196d50..2bbe54a5c54 100644 --- a/compiler/testData/ir/irText/declarations/annotations/propertySetterParameterWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/propertySetterParameterWithAnnotations.txt @@ -28,7 +28,7 @@ FILE fqName: fileName:/propertySetterParameterWithAnnotations.kt correspondingProperty: PROPERTY name:p visibility:public modality:FINAL [var] VALUE_PARAMETER name: index:0 type:kotlin.Int annotations: - CALL 'public constructor () [primary] declared in .AnnParam' type=.AnnParam origin=null + AnnParam BLOCK_BODY SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static] ' type=kotlin.Unit origin=null value: GET_VAR ': kotlin.Int declared in .' type=kotlin.Int origin=null @@ -55,7 +55,7 @@ FILE fqName: fileName:/propertySetterParameterWithAnnotations.kt $this: VALUE_PARAMETER name: type:.C VALUE_PARAMETER name: index:0 type:kotlin.Int annotations: - CALL 'public constructor () [primary] declared in .AnnParam' type=.AnnParam origin=null + AnnParam BLOCK_BODY SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public ' type=kotlin.Unit origin=null receiver: GET_VAR ': .C declared in .C.' type=.C origin=null diff --git a/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.txt index 91eb7b1f7ee..7aec880daf8 100644 --- a/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.txt @@ -25,7 +25,7 @@ FILE fqName: fileName:/receiverParameterWithAnnotations.kt $this: VALUE_PARAMETER name: type:.A $receiver: VALUE_PARAMETER name: type:kotlin.String annotations: - CALL 'public constructor () [primary] declared in .Ann' type=.Ann origin=null + Ann BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun f (): kotlin.String declared in .A' CONST String type=kotlin.String value="" @@ -35,7 +35,7 @@ FILE fqName: fileName:/receiverParameterWithAnnotations.kt $this: VALUE_PARAMETER name: type:.A $receiver: VALUE_PARAMETER name: type:kotlin.String? annotations: - CALL 'public constructor () [primary] declared in .Ann' type=.Ann origin=null + Ann BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in .A' CONST String type=kotlin.String value="" @@ -55,7 +55,7 @@ FILE fqName: fileName:/receiverParameterWithAnnotations.kt FUN name:topLevelF visibility:public modality:FINAL <> ($receiver:kotlin.String?) returnType:kotlin.String $receiver: VALUE_PARAMETER name: type:kotlin.String? annotations: - CALL 'public constructor () [primary] declared in .Ann' type=.Ann origin=null + Ann BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun topLevelF (): kotlin.String declared in ' CONST String type=kotlin.String value="" @@ -64,7 +64,7 @@ FILE fqName: fileName:/receiverParameterWithAnnotations.kt correspondingProperty: PROPERTY name:topLevelP visibility:public modality:FINAL [val] $receiver: VALUE_PARAMETER name: type:kotlin.String annotations: - CALL 'public constructor () [primary] declared in .Ann' type=.Ann origin=null + Ann BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' CONST String type=kotlin.String value="" diff --git a/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.txt b/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.txt index 4a33cfc5eb2..9472377be4d 100644 --- a/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.txt +++ b/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.txt @@ -29,10 +29,5 @@ FILE fqName: fileName:/spreadOperatorInAnnotationArguments.kt $this: VALUE_PARAMETER name: type:kotlin.Any FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (vararg xs: kotlin.String) [primary] declared in .A' type=.A origin=null - xs: VARARG type=kotlin.Array varargElementType=kotlin.String - VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value="a" - VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value="b" + A(xs = [['a'], ['b']]) BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.txt index f7b7d4ca384..9b56b2be3d9 100644 --- a/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.txt @@ -1,9 +1,7 @@ FILE fqName: fileName:/typeAliasesWithAnnotations.kt CLASS ANNOTATION_CLASS name:TestAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] annotations: - CALL 'public constructor (vararg allowedTargets: kotlin.annotation.AnnotationTarget) [primary] declared in kotlin.annotation.Target' type=kotlin.annotation.Target origin=null - allowedTargets: VARARG type=kotlin.Array varargElementType=kotlin.annotation.AnnotationTarget - GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:TYPEALIAS' type=kotlin.annotation.AnnotationTarget + 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 diff --git a/compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.txt index cf356caf131..913c0ab677b 100644 --- a/compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.txt @@ -1,9 +1,7 @@ FILE fqName: fileName:/typeParametersWithAnnotations.kt CLASS ANNOTATION_CLASS name:Anno modality:FINAL visibility:public superTypes:[kotlin.Annotation] annotations: - CALL 'public constructor (vararg allowedTargets: kotlin.annotation.AnnotationTarget) [primary] declared in kotlin.annotation.Target' type=kotlin.annotation.Target origin=null - allowedTargets: VARARG type=kotlin.Array varargElementType=kotlin.annotation.AnnotationTarget - GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:TYPE_PARAMETER' type=kotlin.annotation.AnnotationTarget + 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] FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean @@ -22,5 +20,5 @@ FILE fqName: fileName:/typeParametersWithAnnotations.kt FUN name:foo visibility:public modality:FINAL () returnType:kotlin.Unit TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] annotations: - CALL 'public constructor () [primary] declared in .Anno' type=.Anno origin=null + Anno BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.txt index 58bbb2de542..34ed11ff3d7 100644 --- a/compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.txt @@ -30,16 +30,14 @@ FILE fqName: fileName:/valueParametersWithAnnotations.kt FUN name:testFun visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.Unit VALUE_PARAMETER name:x index:0 type:kotlin.Int annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="testFun.x" + TestAnn(x = 'testFun.x') BLOCK_BODY CLASS CLASS name:TestClassConstructor1 modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestClassConstructor1 CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.TestClassConstructor1 [primary] VALUE_PARAMETER name:x index:0 type:kotlin.Int annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="TestClassConstructor1.x" + TestAnn(x = 'TestClassConstructor1.x') BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestClassConstructor1 modality:FINAL visibility:public superTypes:[kotlin.Any]' diff --git a/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.txt b/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.txt index 2a2e8f4bf24..cbd387484e9 100644 --- a/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.txt +++ b/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.txt @@ -85,88 +85,13 @@ FILE fqName: fileName:/varargsInAnnotationArguments.kt $this: VALUE_PARAMETER name: type:kotlin.Any FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (vararg xs: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CONST Int type=kotlin.Int value=1 - CONST Int type=kotlin.Int value=2 - CONST Int type=kotlin.Int value=3 - CALL 'public constructor (vararg xs: kotlin.String) [primary] declared in .A2' type=.A2 origin=null - xs: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value="a" - CONST String type=kotlin.String value="b" - CONST String type=kotlin.String value="c" - CALL 'public constructor (vararg xs: .A1) [primary] declared in .AA' type=.AA origin=null - xs: VARARG type=kotlin.Array.A1> varargElementType=.A1 - CALL 'public constructor (vararg xs: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CONST Int type=kotlin.Int value=4 - CALL 'public constructor (vararg xs: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CONST Int type=kotlin.Int value=5 - CALL 'public constructor (vararg xs: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CONST Int type=kotlin.Int value=6 - CALL 'public constructor (vararg xs: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CONST Int type=kotlin.Int value=1 - CONST Int type=kotlin.Int value=2 - CONST Int type=kotlin.Int value=3 - CALL 'public constructor (vararg xs: kotlin.String) [primary] declared in .A2' type=.A2 origin=null - xs: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value="a" - CONST String type=kotlin.String value="b" - CONST String type=kotlin.String value="c" - CALL 'public constructor (vararg xs: .A1) [primary] declared in .AA' type=.AA origin=null - xs: VARARG type=kotlin.Array.A1> varargElementType=.A1 - CALL 'public constructor (vararg xs: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CONST Int type=kotlin.Int value=4 - CALL 'public constructor (vararg xs: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CONST Int type=kotlin.Int value=5 - CALL 'public constructor (vararg xs: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CONST Int type=kotlin.Int value=6 - CALL 'public constructor (vararg xs: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CONST Int type=kotlin.Int value=1 - CONST Int type=kotlin.Int value=2 - CONST Int type=kotlin.Int value=3 - CALL 'public constructor (vararg xs: kotlin.String) [primary] declared in .A2' type=.A2 origin=null - xs: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value="a" - CONST String type=kotlin.String value="b" - CONST String type=kotlin.String value="c" - CALL 'public constructor (vararg xs: .A1) [primary] declared in .AA' type=.AA origin=null - xs: VARARG type=kotlin.Array.A1> varargElementType=.A1 - CALL 'public constructor (vararg xs: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CONST Int type=kotlin.Int value=4 - CALL 'public constructor (vararg xs: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CONST Int type=kotlin.Int value=5 - CALL 'public constructor (vararg xs: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CONST Int type=kotlin.Int value=6 + A1(xs = ['1', '2', '3']) + A2(xs = ['a', 'b', 'c']) + AA(xs = [A1(xs = ['4']), A1(xs = ['5']), A1(xs = ['6'])]) BLOCK_BODY FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit annotations: - CALL 'public constructor (vararg xs: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CALL 'public constructor (vararg xs: kotlin.String) [primary] declared in .A2' type=.A2 origin=null - xs: VARARG type=kotlin.Array varargElementType=kotlin.String - CALL 'public constructor (vararg xs: .A1) [primary] declared in .AA' type=.AA origin=null - xs: VARARG type=kotlin.Array.A1> varargElementType=.A1 - CALL 'public constructor (vararg xs: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CALL 'public constructor (vararg xs: kotlin.String) [primary] declared in .A2' type=.A2 origin=null - xs: VARARG type=kotlin.Array varargElementType=kotlin.String - CALL 'public constructor (vararg xs: .A1) [primary] declared in .AA' type=.AA origin=null - xs: VARARG type=kotlin.Array.A1> varargElementType=.A1 - CALL 'public constructor (vararg xs: kotlin.Int) [primary] declared in .A1' type=.A1 origin=null - xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - CALL 'public constructor (vararg xs: kotlin.String) [primary] declared in .A2' type=.A2 origin=null - xs: VARARG type=kotlin.Array varargElementType=kotlin.String - CALL 'public constructor (vararg xs: .A1) [primary] declared in .AA' type=.AA origin=null - xs: VARARG type=kotlin.Array.A1> varargElementType=.A1 + A1(xs = []) + A2(xs = []) + AA(xs = []) BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.txt index b870b90bd27..5e8fe518e37 100644 --- a/compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.txt @@ -31,11 +31,9 @@ FILE fqName: fileName:/variablesWithAnnotations.kt BLOCK_BODY VAR name:testVal type:kotlin.String [val] annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="foo/testVal" + TestAnn(x = 'foo/testVal') CONST String type=kotlin.String value="testVal" VAR name:testVar type:kotlin.String [var] annotations: - CALL 'public constructor (x: kotlin.String) [primary] declared in .TestAnn' type=.TestAnn origin=null - x: CONST String type=kotlin.String value="foo/testVar" + TestAnn(x = 'foo/testVar') CONST String type=kotlin.String value="testVar" diff --git a/compiler/testData/ir/irText/declarations/fileWithAnnotations.txt b/compiler/testData/ir/irText/declarations/fileWithAnnotations.txt index d006a267b66..412b84b075a 100644 --- a/compiler/testData/ir/irText/declarations/fileWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/fileWithAnnotations.txt @@ -1,7 +1,6 @@ FILE fqName: fileName:/fileWithAnnotations.kt annotations: - CALL 'public constructor (name: kotlin.String) [primary] declared in kotlin.jvm.JvmName' type=kotlin.jvm.JvmName origin=null - name: CONST String type=kotlin.String value="FileWithAnnotations" + JvmName(name = 'FileWithAnnotations') FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY PROPERTY name:bar visibility:public modality:FINAL [val] diff --git a/compiler/testData/ir/irText/declarations/parameters/lambdas.txt b/compiler/testData/ir/irText/declarations/parameters/lambdas.txt index 11ed57a09ed..6fec298c9a4 100644 --- a/compiler/testData/ir/irText/declarations/parameters/lambdas.txt +++ b/compiler/testData/ir/irText/declarations/parameters/lambdas.txt @@ -15,9 +15,9 @@ FILE fqName: fileName:/lambdas.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Function1 declared in ' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function1 visibility:public [final,static] ' type=kotlin.Function1 origin=null PROPERTY name:test2 visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:test2 type:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 visibility:public [final,static] + FIELD PROPERTY_BACKING_FIELD name:test2 type:@[ExtensionFunctionType] kotlin.Function2 visibility:public [final,static] EXPRESSION_BODY - BLOCK type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 origin=LAMBDA + BLOCK type=@[ExtensionFunctionType] kotlin.Function2 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:kotlin.Any, it:kotlin.Any) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:kotlin.Any VALUE_PARAMETER name:it index:0 type:kotlin.Any @@ -25,12 +25,12 @@ FILE fqName: fileName:/lambdas.kt RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Any): kotlin.Int declared in .test2' CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null $this: GET_VAR 'it: kotlin.Any declared in .test2.' type=kotlin.Any origin=null - FUNCTION_REFERENCE 'local final fun (it: kotlin.Any): kotlin.Int declared in .test2' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 origin=LAMBDA - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 + FUNCTION_REFERENCE 'local final fun (it: kotlin.Any): kotlin.Int declared in .test2' type=@[ExtensionFunctionType] kotlin.Function2 origin=LAMBDA + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:@[ExtensionFunctionType] kotlin.Function2 correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val] BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 visibility:public [final,static] ' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 origin=null + RETURN type=kotlin.Nothing from='public final fun (): @[ExtensionFunctionType] kotlin.Function2 declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:@[ExtensionFunctionType] kotlin.Function2 visibility:public [final,static] ' type=@[ExtensionFunctionType] kotlin.Function2 origin=null PROPERTY name:test3 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.Function2 visibility:public [final,static] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/expressions/callableReferenceTypeArguments.txt b/compiler/testData/ir/irText/expressions/callableReferenceTypeArguments.txt index c95fef92b81..20e42b5b98b 100644 --- a/compiler/testData/ir/irText/expressions/callableReferenceTypeArguments.txt +++ b/compiler/testData/ir/irText/expressions/callableReferenceTypeArguments.txt @@ -34,7 +34,7 @@ FILE fqName: fileName:/callableReferenceTypeArguments.kt PROPERTY name:test1 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function1 visibility:public [final,static] EXPRESSION_BODY - FUNCTION_REFERENCE 'public final fun topLevel1 (x: T of .topLevel1): kotlin.Unit [inline] declared in ' type=kotlin.reflect.KFunction1<@[CALL 'public constructor (name: kotlin.String) [primary] declared in kotlin.ParameterName' type=kotlin.ParameterName origin=null] kotlin.Int, kotlin.Unit> origin=null + FUNCTION_REFERENCE 'public final fun topLevel1 (x: T of .topLevel1): kotlin.Unit [inline] declared in ' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'x')] kotlin.Int, kotlin.Unit> origin=null : kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function1 correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val] @@ -44,7 +44,7 @@ FILE fqName: fileName:/callableReferenceTypeArguments.kt PROPERTY name:test2 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Function1, kotlin.Unit> visibility:public [final,static] EXPRESSION_BODY - FUNCTION_REFERENCE 'public final fun topLevel2 (x: kotlin.collections.List.topLevel2>): kotlin.Unit [inline] declared in ' type=kotlin.reflect.KFunction1<@[CALL 'public constructor (name: kotlin.String) [primary] declared in kotlin.ParameterName' type=kotlin.ParameterName origin=null] kotlin.collections.List, kotlin.Unit> origin=null + FUNCTION_REFERENCE 'public final fun topLevel2 (x: kotlin.collections.List.topLevel2>): kotlin.Unit [inline] declared in ' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'x')] kotlin.collections.List, kotlin.Unit> origin=null : kotlin.String FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function1, kotlin.Unit> correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val] @@ -54,7 +54,7 @@ FILE fqName: fileName:/callableReferenceTypeArguments.kt PROPERTY name:test3 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.Function1 visibility:public [final,static] EXPRESSION_BODY - FUNCTION_REFERENCE 'public final fun objectMember (x: T of .Host.objectMember): kotlin.Unit [inline] declared in .Host' type=kotlin.reflect.KFunction1<@[CALL 'public constructor (name: kotlin.String) [primary] declared in kotlin.ParameterName' type=kotlin.ParameterName origin=null] kotlin.Int, kotlin.Unit> origin=null + FUNCTION_REFERENCE 'public final fun objectMember (x: T of .Host.objectMember): kotlin.Unit [inline] declared in .Host' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'x')] kotlin.Int, kotlin.Unit> origin=null : kotlin.Int $this: GET_OBJECT 'CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Host FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function1 diff --git a/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.txt b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.txt index e60d7cfc515..4b5ea4a407a 100644 --- a/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.txt +++ b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.txt @@ -1,58 +1,60 @@ FILE fqName: fileName:/constructorWithOwnTypeParametersCall.kt - FUN name:testKotlin visibility:public modality:FINAL <> () returnType:.K1.K2 + FUN name:testKotlin visibility:public modality:FINAL <> () returnType:.K1.K2 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testKotlin (): .K1.K2 declared in ' CONSTRUCTOR_CALL 'public constructor () [primary] declared in .K1.K2' type=.K1.K2 origin=null : kotlin.String - $outer: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .K1' type=.K1 origin=null - : kotlin.Int - FUN name:testJava visibility:public modality:FINAL <> () returnType:.J1.J2 + $outer: TYPE_OP type=.K1.K1> origin=IMPLICIT_CAST typeOperand=.K1.K1> + CONSTRUCTOR_CALL 'public constructor () [primary] declared in .K1' type=.K1 origin=null + : kotlin.Int + FUN name:testJava visibility:public modality:FINAL <> () returnType:.J1.J2 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testJava (): .J1.J2 declared in ' CONSTRUCTOR_CALL 'public constructor () declared in .J1.J2' type=.J1.J2 origin=null : kotlin.Double : kotlin.CharSequence - $outer: CONSTRUCTOR_CALL 'public constructor () declared in .J1' type=.J1 origin=null - : kotlin.Int - : kotlin.String + $outer: TYPE_OP type=.J1.J1> origin=IMPLICIT_CAST typeOperand=.J1.J1> + CONSTRUCTOR_CALL 'public constructor () declared in .J1' type=.J1 origin=null + : kotlin.Int + : kotlin.String CLASS CLASS name:K1 modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.K1.K1> + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.K1.K1> TYPE_PARAMETER name:T1 index:0 variance: superTypes:[kotlin.Number] - CONSTRUCTOR visibility:public <> () returnType:.K1.K1> [primary] + CONSTRUCTOR visibility:public <> () returnType:.K1.K1> [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:K1 modality:FINAL visibility:public superTypes:[kotlin.Any]' CLASS CLASS name:K2 modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.K1.K2.K1.K2, T1 of .K1> + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.K1.K2.K1.K2, T1 of .K1> TYPE_PARAMETER name:T2 index:0 variance: superTypes:[kotlin.CharSequence] - CONSTRUCTOR visibility:public <> ($this:.K1.K1>) returnType:.K1.K2.K1.K2, T1 of .K1> [primary] - $outer: VALUE_PARAMETER name: type:.K1.K1> + CONSTRUCTOR visibility:public <> ($this:.K1.K1>) returnType:.K1.K2.K1.K2, T1 of .K1> [primary] + $outer: VALUE_PARAMETER name: type:.K1.K1> BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:K2 modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int overridden: public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String overridden: public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int overridden: public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String overridden: public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.txt b/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.txt index 597f76658c3..138b23814ed 100644 --- a/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.txt +++ b/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.txt @@ -1,17 +1,17 @@ FILE fqName: fileName:/extFunInvokeAsFun.kt - FUN name:with1 visibility:public modality:FINAL <> (receiver:kotlin.Any?, block:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1) returnType:kotlin.Unit + FUN name:with1 visibility:public modality:FINAL <> (receiver:kotlin.Any?, block:@[ExtensionFunctionType] kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:receiver index:0 type:kotlin.Any? - VALUE_PARAMETER name:block index:1 type:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 + VALUE_PARAMETER name:block index:1 type:@[ExtensionFunctionType] kotlin.Function1 BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun with1 (receiver: kotlin.Any?, block: @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1): kotlin.Unit declared in ' + RETURN type=kotlin.Nothing from='public final fun with1 (receiver: kotlin.Any?, block: @[ExtensionFunctionType] kotlin.Function1): kotlin.Unit declared in ' CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=kotlin.Unit origin=INVOKE - $this: GET_VAR 'block: @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 declared in .with1' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 origin=VARIABLE_AS_FUNCTION + $this: GET_VAR 'block: @[ExtensionFunctionType] kotlin.Function1 declared in .with1' type=@[ExtensionFunctionType] kotlin.Function1 origin=VARIABLE_AS_FUNCTION p1: GET_VAR 'receiver: kotlin.Any? declared in .with1' type=kotlin.Any? origin=null - FUN name:with2 visibility:public modality:FINAL <> (receiver:kotlin.Any?, block:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1) returnType:kotlin.Unit + FUN name:with2 visibility:public modality:FINAL <> (receiver:kotlin.Any?, block:@[ExtensionFunctionType] kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:receiver index:0 type:kotlin.Any? - VALUE_PARAMETER name:block index:1 type:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 + VALUE_PARAMETER name:block index:1 type:@[ExtensionFunctionType] kotlin.Function1 BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun with2 (receiver: kotlin.Any?, block: @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1): kotlin.Unit declared in ' + RETURN type=kotlin.Nothing from='public final fun with2 (receiver: kotlin.Any?, block: @[ExtensionFunctionType] kotlin.Function1): kotlin.Unit declared in ' CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=kotlin.Unit origin=INVOKE - $this: GET_VAR 'block: @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 declared in .with2' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 origin=VARIABLE_AS_FUNCTION + $this: GET_VAR 'block: @[ExtensionFunctionType] kotlin.Function1 declared in .with2' type=@[ExtensionFunctionType] kotlin.Function1 origin=VARIABLE_AS_FUNCTION p1: GET_VAR 'receiver: kotlin.Any? declared in .with2' type=kotlin.Any? origin=null diff --git a/compiler/testData/ir/irText/expressions/extFunSafeInvoke.txt b/compiler/testData/ir/irText/expressions/extFunSafeInvoke.txt index 93b6d403cdc..af2d81f3119 100644 --- a/compiler/testData/ir/irText/expressions/extFunSafeInvoke.txt +++ b/compiler/testData/ir/irText/expressions/extFunSafeInvoke.txt @@ -1,9 +1,9 @@ FILE fqName: fileName:/extFunSafeInvoke.kt - FUN name:test visibility:public modality:FINAL <> (receiver:kotlin.Any?, fn:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function3) returnType:kotlin.Unit? + FUN name:test visibility:public modality:FINAL <> (receiver:kotlin.Any?, fn:@[ExtensionFunctionType] kotlin.Function3) returnType:kotlin.Unit? VALUE_PARAMETER name:receiver index:0 type:kotlin.Any? - VALUE_PARAMETER name:fn index:1 type:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function3 + VALUE_PARAMETER name:fn index:1 type:@[ExtensionFunctionType] kotlin.Function3 BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test (receiver: kotlin.Any?, fn: @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function3): kotlin.Unit? declared in ' + RETURN type=kotlin.Nothing from='public final fun test (receiver: kotlin.Any?, fn: @[ExtensionFunctionType] kotlin.Function3): kotlin.Unit? declared in ' BLOCK type=kotlin.Unit? origin=SAFE_CALL VAR IR_TEMPORARY_VARIABLE name:tmp0_safe_receiver type:kotlin.Any? [val] GET_VAR 'receiver: kotlin.Any? declared in .test' type=kotlin.Any? origin=null @@ -16,7 +16,7 @@ FILE fqName: fileName:/extFunSafeInvoke.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CALL 'public abstract fun invoke (p1: P1 of kotlin.Function3, p2: P2 of kotlin.Function3, p3: P3 of kotlin.Function3): R of kotlin.Function3 declared in kotlin.Function3' type=kotlin.Unit origin=INVOKE - $this: GET_VAR 'fn: @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function3 declared in .test' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function3 origin=VARIABLE_AS_FUNCTION + $this: GET_VAR 'fn: @[ExtensionFunctionType] kotlin.Function3 declared in .test' type=@[ExtensionFunctionType] kotlin.Function3 origin=VARIABLE_AS_FUNCTION p1: GET_VAR 'val tmp0_safe_receiver: kotlin.Any? [val] declared in .test' type=kotlin.Any? origin=null p2: CONST Int type=kotlin.Int value=42 p3: CONST String type=kotlin.String value="Hello" diff --git a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.txt b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.txt index 5c107980312..538245589e8 100644 --- a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.txt +++ b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.txt @@ -1,7 +1,7 @@ FILE fqName: fileName:/signedToUnsignedConversions_test.kt PROPERTY name:IMPLICIT_INT visibility:public modality:FINAL [const,val] annotations: - CALL 'public constructor () [primary] declared in kotlin.internal.ImplicitIntegerCoercion' type=kotlin.internal.ImplicitIntegerCoercion origin=null + ImplicitIntegerCoercion FIELD PROPERTY_BACKING_FIELD name:IMPLICIT_INT type:kotlin.Int visibility:public [final,static] EXPRESSION_BODY CONST Int type=kotlin.Int value=255 @@ -12,7 +12,7 @@ FILE fqName: fileName:/signedToUnsignedConversions_test.kt GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:IMPLICIT_INT type:kotlin.Int visibility:public [final,static] ' type=kotlin.Int origin=null PROPERTY name:EXPLICIT_INT visibility:public modality:FINAL [const,val] annotations: - CALL 'public constructor () [primary] declared in kotlin.internal.ImplicitIntegerCoercion' type=kotlin.internal.ImplicitIntegerCoercion origin=null + ImplicitIntegerCoercion FIELD PROPERTY_BACKING_FIELD name:EXPLICIT_INT type:kotlin.Int visibility:public [final,static] EXPRESSION_BODY CONST Int type=kotlin.Int value=255 @@ -23,7 +23,7 @@ FILE fqName: fileName:/signedToUnsignedConversions_test.kt GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:EXPLICIT_INT type:kotlin.Int visibility:public [final,static] ' type=kotlin.Int origin=null PROPERTY name:LONG_CONST visibility:public modality:FINAL [const,val] annotations: - CALL 'public constructor () [primary] declared in kotlin.internal.ImplicitIntegerCoercion' type=kotlin.internal.ImplicitIntegerCoercion origin=null + ImplicitIntegerCoercion FIELD PROPERTY_BACKING_FIELD name:LONG_CONST type:kotlin.Long visibility:public [final,static] EXPRESSION_BODY CONST Long type=kotlin.Long value=255 @@ -34,7 +34,7 @@ FILE fqName: fileName:/signedToUnsignedConversions_test.kt GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:LONG_CONST type:kotlin.Long visibility:public [final,static] ' type=kotlin.Long origin=null PROPERTY name:NON_CONST visibility:public modality:FINAL [val] annotations: - CALL 'public constructor () [primary] declared in kotlin.internal.ImplicitIntegerCoercion' type=kotlin.internal.ImplicitIntegerCoercion origin=null + ImplicitIntegerCoercion FIELD PROPERTY_BACKING_FIELD name:NON_CONST type:kotlin.Int visibility:public [final,static] EXPRESSION_BODY CONST Int type=kotlin.Int value=255 @@ -45,7 +45,7 @@ FILE fqName: fileName:/signedToUnsignedConversions_test.kt GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:NON_CONST type:kotlin.Int visibility:public [final,static] ' type=kotlin.Int origin=null PROPERTY name:BIGGER_THAN_UBYTE visibility:public modality:FINAL [const,val] annotations: - CALL 'public constructor () [primary] declared in kotlin.internal.ImplicitIntegerCoercion' type=kotlin.internal.ImplicitIntegerCoercion origin=null + ImplicitIntegerCoercion FIELD PROPERTY_BACKING_FIELD name:BIGGER_THAN_UBYTE type:kotlin.Int visibility:public [final,static] EXPRESSION_BODY CONST Int type=kotlin.Int value=256 @@ -56,7 +56,7 @@ FILE fqName: fileName:/signedToUnsignedConversions_test.kt GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:BIGGER_THAN_UBYTE type:kotlin.Int visibility:public [final,static] ' type=kotlin.Int origin=null PROPERTY name:UINT_CONST visibility:public modality:FINAL [const,val] annotations: - CALL 'public constructor () [primary] declared in kotlin.internal.ImplicitIntegerCoercion' type=kotlin.internal.ImplicitIntegerCoercion origin=null + ImplicitIntegerCoercion FIELD PROPERTY_BACKING_FIELD name:UINT_CONST type:kotlin.UInt visibility:public [final,static] EXPRESSION_BODY CONST Int type=kotlin.UInt value=42 @@ -68,32 +68,32 @@ FILE fqName: fileName:/signedToUnsignedConversions_test.kt FUN name:takeUByte visibility:public modality:FINAL <> (u:kotlin.UByte) returnType:kotlin.Unit VALUE_PARAMETER name:u index:0 type:kotlin.UByte annotations: - CALL 'public constructor () [primary] declared in kotlin.internal.ImplicitIntegerCoercion' type=kotlin.internal.ImplicitIntegerCoercion origin=null + ImplicitIntegerCoercion BLOCK_BODY FUN name:takeUShort visibility:public modality:FINAL <> (u:kotlin.UShort) returnType:kotlin.Unit VALUE_PARAMETER name:u index:0 type:kotlin.UShort annotations: - CALL 'public constructor () [primary] declared in kotlin.internal.ImplicitIntegerCoercion' type=kotlin.internal.ImplicitIntegerCoercion origin=null + ImplicitIntegerCoercion BLOCK_BODY FUN name:takeUInt visibility:public modality:FINAL <> (u:kotlin.UInt) returnType:kotlin.Unit VALUE_PARAMETER name:u index:0 type:kotlin.UInt annotations: - CALL 'public constructor () [primary] declared in kotlin.internal.ImplicitIntegerCoercion' type=kotlin.internal.ImplicitIntegerCoercion origin=null + ImplicitIntegerCoercion BLOCK_BODY FUN name:takeULong visibility:public modality:FINAL <> (u:kotlin.ULong) returnType:kotlin.Unit VALUE_PARAMETER name:u index:0 type:kotlin.ULong annotations: - CALL 'public constructor () [primary] declared in kotlin.internal.ImplicitIntegerCoercion' type=kotlin.internal.ImplicitIntegerCoercion origin=null + ImplicitIntegerCoercion BLOCK_BODY FUN name:takeUBytes visibility:public modality:FINAL <> (u:kotlin.UByteArray) returnType:kotlin.Unit VALUE_PARAMETER name:u index:0 type:kotlin.UByteArray varargElementType:kotlin.UByte [vararg] annotations: - CALL 'public constructor () [primary] declared in kotlin.internal.ImplicitIntegerCoercion' type=kotlin.internal.ImplicitIntegerCoercion origin=null + ImplicitIntegerCoercion BLOCK_BODY FUN name:takeLong visibility:public modality:FINAL <> (l:kotlin.Long) returnType:kotlin.Unit VALUE_PARAMETER name:l index:0 type:kotlin.Long annotations: - CALL 'public constructor () [primary] declared in kotlin.internal.ImplicitIntegerCoercion' type=kotlin.internal.ImplicitIntegerCoercion origin=null + ImplicitIntegerCoercion BLOCK_BODY FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.txt b/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.txt index a634e15bd92..58bccfe5377 100644 --- a/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.txt +++ b/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.txt @@ -36,4 +36,5 @@ FILE fqName: fileName:/specializedTypeAliasConstructorCall.kt RETURN type=kotlin.Nothing from='public final fun test (): .Cell declared in ' CONSTRUCTOR_CALL 'public constructor (value: T of .Cell) [primary] declared in .Cell' type=.Cell origin=null : kotlin.Int - value: CONST Int type=kotlin.Int value=42 + value: TYPE_OP type=T of .Cell origin=IMPLICIT_CAST typeOperand=T of .Cell + CONST Int type=kotlin.Int value=42 diff --git a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt index 00385a16810..ff33b584cd7 100644 --- a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt +++ b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt @@ -15,12 +15,12 @@ FILE fqName: fileName:/variableAsFunctionCall.kt RETURN type=kotlin.Nothing from='public final fun test1 (f: kotlin.Function0): kotlin.Unit declared in ' CALL 'public abstract fun invoke (): R of kotlin.Function0 declared in kotlin.Function0' type=kotlin.Unit origin=INVOKE $this: GET_VAR 'f: kotlin.Function0 declared in .test1' type=kotlin.Function0 origin=VARIABLE_AS_FUNCTION - FUN name:test2 visibility:public modality:FINAL <> (f:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1) returnType:kotlin.Unit - VALUE_PARAMETER name:f index:0 type:@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 + FUN name:test2 visibility:public modality:FINAL <> (f:@[ExtensionFunctionType] kotlin.Function1) returnType:kotlin.Unit + VALUE_PARAMETER name:f index:0 type:@[ExtensionFunctionType] kotlin.Function1 BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test2 (f: @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1): kotlin.Unit declared in ' + RETURN type=kotlin.Nothing from='public final fun test2 (f: @[ExtensionFunctionType] kotlin.Function1): kotlin.Unit declared in ' CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=kotlin.Unit origin=INVOKE - $this: GET_VAR 'f: @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 declared in .test2' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 origin=VARIABLE_AS_FUNCTION + $this: GET_VAR 'f: @[ExtensionFunctionType] kotlin.Function1 declared in .test2' type=@[ExtensionFunctionType] kotlin.Function1 origin=VARIABLE_AS_FUNCTION p1: CONST String type=kotlin.String value="hello" FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY diff --git a/compiler/testData/ir/irText/lambdas/extensionLambda.txt b/compiler/testData/ir/irText/lambdas/extensionLambda.txt index 6ce82631c70..08b8cb52ee6 100644 --- a/compiler/testData/ir/irText/lambdas/extensionLambda.txt +++ b/compiler/testData/ir/irText/lambdas/extensionLambda.txt @@ -2,15 +2,15 @@ FILE fqName: fileName:/extensionLambda.kt FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1 (): kotlin.Int declared in ' - CALL 'public final fun run (block: @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1): R of kotlin.run [inline] declared in kotlin' type=kotlin.Int origin=null + CALL 'public final fun run (block: @[ExtensionFunctionType] kotlin.Function1): R of kotlin.run [inline] declared in kotlin' type=kotlin.Int origin=null : kotlin.String : kotlin.Int $receiver: CONST String type=kotlin.String value="42" - block: BLOCK type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 origin=LAMBDA + block: BLOCK type=@[ExtensionFunctionType] kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:kotlin.String) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .test1' CALL 'public open fun (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR ': kotlin.String declared in .test1.' type=kotlin.String origin=null - FUNCTION_REFERENCE 'local final fun (): kotlin.Int declared in .test1' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 origin=LAMBDA + FUNCTION_REFERENCE 'local final fun (): kotlin.Int declared in .test1' type=@[ExtensionFunctionType] kotlin.Function1 origin=LAMBDA diff --git a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt index 0190d900237..4a81f8258c9 100644 --- a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt +++ b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt @@ -86,29 +86,29 @@ FILE fqName: fileName:/multipleImplicitReceivers.kt VALUE_PARAMETER name:invokeImpl index:1 type:.IInvoke BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public final fun with (receiver: T of kotlin.with, block: @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1): R of kotlin.with [inline] declared in kotlin' type=kotlin.Int origin=null + CALL 'public final fun with (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1): R of kotlin.with [inline] declared in kotlin' type=kotlin.Int origin=null : .A : kotlin.Int receiver: GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.A - block: BLOCK type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1<.A, kotlin.Int> origin=LAMBDA + block: BLOCK type=@[ExtensionFunctionType] kotlin.Function1<.A, kotlin.Int> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.A) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:.A BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .test' - CALL 'public final fun with (receiver: T of kotlin.with, block: @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1): R of kotlin.with [inline] declared in kotlin' type=kotlin.Int origin=null + CALL 'public final fun with (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1): R of kotlin.with [inline] declared in kotlin' type=kotlin.Int origin=null : .IFoo : kotlin.Int receiver: GET_VAR 'fooImpl: .IFoo declared in .test' type=.IFoo origin=null - block: BLOCK type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1<.IFoo, kotlin.Int> origin=LAMBDA + block: BLOCK type=@[ExtensionFunctionType] kotlin.Function1<.IFoo, kotlin.Int> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.IFoo) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:.IFoo BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .test.' - CALL 'public final fun with (receiver: T of kotlin.with, block: @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1): R of kotlin.with [inline] declared in kotlin' type=kotlin.Int origin=null + CALL 'public final fun with (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1): R of kotlin.with [inline] declared in kotlin' type=kotlin.Int origin=null : .IInvoke : kotlin.Int receiver: GET_VAR 'invokeImpl: .IInvoke declared in .test' type=.IInvoke origin=null - block: BLOCK type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1<.IInvoke, kotlin.Int> origin=LAMBDA + block: BLOCK type=@[ExtensionFunctionType] kotlin.Function1<.IInvoke, kotlin.Int> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.IInvoke) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:.IInvoke BLOCK_BODY @@ -118,6 +118,6 @@ FILE fqName: fileName:/multipleImplicitReceivers.kt $receiver: CALL 'public open fun (): .B declared in .IFoo' type=.B origin=GET_PROPERTY $this: GET_VAR ': .IFoo declared in .test..' type=.IFoo origin=null $receiver: GET_VAR ': .A declared in .test.' type=.A origin=null - FUNCTION_REFERENCE 'local final fun (): kotlin.Int declared in .test..' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1<.IInvoke, kotlin.Int> origin=LAMBDA - FUNCTION_REFERENCE 'local final fun (): kotlin.Int declared in .test.' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1<.IFoo, kotlin.Int> origin=LAMBDA - FUNCTION_REFERENCE 'local final fun (): kotlin.Int declared in .test' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1<.A, kotlin.Int> origin=LAMBDA + FUNCTION_REFERENCE 'local final fun (): kotlin.Int declared in .test..' type=@[ExtensionFunctionType] kotlin.Function1<.IInvoke, kotlin.Int> origin=LAMBDA + FUNCTION_REFERENCE 'local final fun (): kotlin.Int declared in .test.' type=@[ExtensionFunctionType] kotlin.Function1<.IFoo, kotlin.Int> origin=LAMBDA + FUNCTION_REFERENCE 'local final fun (): kotlin.Int declared in .test' type=@[ExtensionFunctionType] kotlin.Function1<.A, kotlin.Int> origin=LAMBDA diff --git a/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.txt b/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.txt index 0b0f11a6f16..ff6d893d3bf 100644 --- a/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.txt +++ b/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.txt @@ -36,8 +36,10 @@ FILE fqName: fileName:/typeAliasCtorForGenericClass.kt VAR name:b type:.A [val] CONSTRUCTOR_CALL 'public constructor (q: Q of .A) [primary] declared in .A' type=.A origin=null : kotlin.Int - q: CONST Int type=kotlin.Int value=2 + q: TYPE_OP type=Q of .A origin=IMPLICIT_CAST typeOperand=Q of .A + CONST Int type=kotlin.Int value=2 VAR name:b2 type:.A<.A> [val] CONSTRUCTOR_CALL 'public constructor (q: Q of .A) [primary] declared in .A' type=.A<.A> origin=null : .A - q: GET_VAR 'val b: .A [val] declared in .bar' type=.A origin=null + q: TYPE_OP type=Q of .A origin=IMPLICIT_CAST typeOperand=Q of .A + GET_VAR 'val b: .A [val] declared in .bar' type=.A origin=null diff --git a/compiler/testData/ir/irText/stubs/builtinMap.txt b/compiler/testData/ir/irText/stubs/builtinMap.txt index 197283d4f0f..cdbfbb1b653 100644 --- a/compiler/testData/ir/irText/stubs/builtinMap.txt +++ b/compiler/testData/ir/irText/stubs/builtinMap.txt @@ -16,13 +16,14 @@ FILE fqName: fileName:/builtinMap.kt pair: GET_VAR 'pair: kotlin.Pair.plus, V1 of .plus> declared in .plus' type=kotlin.Pair.plus, V1 of .plus> origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public final fun apply (block: @[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1): T of kotlin.apply [inline] declared in kotlin' type=java.util.LinkedHashMap.plus?, V1 of .plus?> origin=null + then: CALL 'public final fun apply (block: @[ExtensionFunctionType] kotlin.Function1): T of kotlin.apply [inline] declared in kotlin' type=java.util.LinkedHashMap.plus?, V1 of .plus?> origin=null : java.util.LinkedHashMap.plus?, V1 of .plus?> $receiver: CONSTRUCTOR_CALL 'public constructor (p0: kotlin.collections.Map?) declared in java.util.LinkedHashMap' type=java.util.LinkedHashMap.plus?, V1 of .plus?> origin=null : K1 of .plus? : V1 of .plus? - p0: GET_VAR ': kotlin.collections.Map.plus, V1 of .plus> declared in .plus' type=kotlin.collections.Map.plus, V1 of .plus> origin=null - block: BLOCK type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1.plus?, V1 of .plus?>, kotlin.Unit> origin=LAMBDA + p0: TYPE_OP type=kotlin.collections.Map origin=IMPLICIT_CAST typeOperand=kotlin.collections.Map + GET_VAR ': kotlin.collections.Map.plus, V1 of .plus> declared in .plus' type=kotlin.collections.Map.plus, V1 of .plus> origin=null + block: BLOCK type=@[ExtensionFunctionType] kotlin.Function1.plus?, V1 of .plus?>, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:java.util.LinkedHashMap.plus?, V1 of .plus?>) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name: type:java.util.LinkedHashMap.plus?, V1 of .plus?> BLOCK_BODY @@ -34,4 +35,4 @@ FILE fqName: fileName:/builtinMap.kt $this: GET_VAR 'pair: kotlin.Pair.plus, V1 of .plus> declared in .plus' type=kotlin.Pair.plus, V1 of .plus> origin=null value: CALL 'public final fun (): B of kotlin.Pair declared in kotlin.Pair' type=V1 of .plus origin=GET_PROPERTY $this: GET_VAR 'pair: kotlin.Pair.plus, V1 of .plus> declared in .plus' type=kotlin.Pair.plus, V1 of .plus> origin=null - FUNCTION_REFERENCE 'local final fun (): kotlin.Unit declared in .plus' type=@[CALL 'public constructor () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1.plus?, V1 of .plus?>, kotlin.Unit> origin=LAMBDA + FUNCTION_REFERENCE 'local final fun (): kotlin.Unit declared in .plus' type=@[ExtensionFunctionType] kotlin.Function1.plus?, V1 of .plus?>, kotlin.Unit> origin=LAMBDA diff --git a/compiler/testData/ir/irText/stubs/constFromBuiltins__kotlin.Int.txt b/compiler/testData/ir/irText/stubs/constFromBuiltins__kotlin.Int.txt index d7c7edf6e61..005ac83439c 100644 --- a/compiler/testData/ir/irText/stubs/constFromBuiltins__kotlin.Int.txt +++ b/compiler/testData/ir/irText/stubs/constFromBuiltins__kotlin.Int.txt @@ -79,62 +79,32 @@ CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:publ VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: FUN IR_EXTERNAL_DECLARATION_STUB name:mod visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int annotations: - CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="Use rem(other) instead" - 2: CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="rem(other)" - 2: VARARG type=> varargElementType= - 3: GET_ENUM 'UNBOUND IrEnumEntrySymbolImpl' type= + (1 = 'Use rem(other) instead', 2 = (1 = 'rem(other)', 2 = []), 3 = GET_ENUM 'UNBOUND IrEnumEntrySymbolImpl' type=) $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: FUN IR_EXTERNAL_DECLARATION_STUB name:mod visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: annotations: - CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="Use rem(other) instead" - 2: CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="rem(other)" - 2: VARARG type=> varargElementType= - 3: GET_ENUM 'UNBOUND IrEnumEntrySymbolImpl' type= + (1 = 'Use rem(other) instead', 2 = (1 = 'rem(other)', 2 = []), 3 = GET_ENUM 'UNBOUND IrEnumEntrySymbolImpl' type=) $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: FUN IR_EXTERNAL_DECLARATION_STUB name:mod visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: annotations: - CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="Use rem(other) instead" - 2: CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="rem(other)" - 2: VARARG type=> varargElementType= - 3: GET_ENUM 'UNBOUND IrEnumEntrySymbolImpl' type= + (1 = 'Use rem(other) instead', 2 = (1 = 'rem(other)', 2 = []), 3 = GET_ENUM 'UNBOUND IrEnumEntrySymbolImpl' type=) $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: FUN IR_EXTERNAL_DECLARATION_STUB name:mod visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int annotations: - CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="Use rem(other) instead" - 2: CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="rem(other)" - 2: VARARG type=> varargElementType= - 3: GET_ENUM 'UNBOUND IrEnumEntrySymbolImpl' type= + (1 = 'Use rem(other) instead', 2 = (1 = 'rem(other)', 2 = []), 3 = GET_ENUM 'UNBOUND IrEnumEntrySymbolImpl' type=) $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB name:mod visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: annotations: - CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="Use rem(other) instead" - 2: CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="rem(other)" - 2: VARARG type=> varargElementType= - 3: GET_ENUM 'UNBOUND IrEnumEntrySymbolImpl' type= + (1 = 'Use rem(other) instead', 2 = (1 = 'rem(other)', 2 = []), 3 = GET_ENUM 'UNBOUND IrEnumEntrySymbolImpl' type=) $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: FUN IR_EXTERNAL_DECLARATION_STUB name:mod visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int annotations: - CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="Use rem(other) instead" - 2: CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="rem(other)" - 2: VARARG type=> varargElementType= - 3: GET_ENUM 'UNBOUND IrEnumEntrySymbolImpl' type= + (1 = 'Use rem(other) instead', 2 = (1 = 'rem(other)', 2 = []), 3 = GET_ENUM 'UNBOUND IrEnumEntrySymbolImpl' type=) $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: FUN IR_EXTERNAL_DECLARATION_STUB name:or visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int @@ -172,38 +142,32 @@ CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:publ VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int annotations: - CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="1.1" + (1 = '1.1') $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: annotations: - CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="1.1" + (1 = '1.1') $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: annotations: - CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="1.1" + (1 = '1.1') $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int annotations: - CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="1.1" + (1 = '1.1') $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: annotations: - CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="1.1" + (1 = '1.1') $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int annotations: - CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="1.1" + (1 = '1.1') $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: FUN IR_EXTERNAL_DECLARATION_STUB name:shl visibility:public modality:FINAL <> ($this:kotlin.Int, bitCount:kotlin.Int) returnType:kotlin.Int @@ -292,8 +256,7 @@ CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:publ $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int.Companion PROPERTY IR_EXTERNAL_DECLARATION_STUB name:SIZE_BITS visibility:public modality:FINAL [const,val] annotations: - CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="1.3" + (1 = '1.3') FIELD IR_EXTERNAL_DECLARATION_STUB name:SIZE_BITS type:kotlin.Int visibility:public [final] EXPRESSION_BODY CONST Int type=kotlin.Int value=32 @@ -302,8 +265,7 @@ CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:publ $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int.Companion PROPERTY IR_EXTERNAL_DECLARATION_STUB name:SIZE_BYTES visibility:public modality:FINAL [const,val] annotations: - CALL 'UNBOUND IrConstructorSymbolImpl' type= origin=null - 1: CONST String type= value="1.3" + (1 = '1.3') FIELD IR_EXTERNAL_DECLARATION_STUB name:SIZE_BYTES type:kotlin.Int visibility:public [final] EXPRESSION_BODY CONST Int type=kotlin.Int value=4 diff --git a/compiler/testData/ir/irText/types/localVariableOfIntersectionType.txt b/compiler/testData/ir/irText/types/localVariableOfIntersectionType.txt index 728302d8111..4e3ef123a83 100644 --- a/compiler/testData/ir/irText/types/localVariableOfIntersectionType.txt +++ b/compiler/testData/ir/irText/types/localVariableOfIntersectionType.txt @@ -1,98 +1,98 @@ FILE fqName: fileName:/localVariableOfIntersectionType.kt CLASS INTERFACE name:In modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.In.In> + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.In.In> TYPE_PARAMETER name:T index:0 variance:in superTypes:[kotlin.Any?] - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int overridden: public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String overridden: public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any CLASS INTERFACE name:Inv modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Inv.Inv> + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Inv.Inv> TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - PROPERTY name:t visibility:public modality:ABSTRACT [val] - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:.Inv.Inv>) returnType:T of .Inv - correspondingProperty: PROPERTY name:t visibility:public modality:ABSTRACT [val] - $this: VALUE_PARAMETER name: type:.Inv.Inv> - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean + PROPERTY name:t visibility:public modality:ABSTRACT [val] + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:.Inv.Inv>) returnType:T of .Inv + correspondingProperty: PROPERTY name:t visibility:public modality:ABSTRACT [val] + $this: VALUE_PARAMETER name: type:.Inv.Inv> + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int overridden: public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String overridden: public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any CLASS INTERFACE name:Z modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Z - FUN name:create visibility:public modality:ABSTRACT ($this:.Z, x:.In.Z.create>, y:.In.Z.create>) returnType:.Inv.Z.create> + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Z + FUN name:create visibility:public modality:ABSTRACT ($this:.Z, x:.In.Z.create>, y:.In.Z.create>) returnType:.Inv.Z.create> TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - $this: VALUE_PARAMETER name: type:.Z - VALUE_PARAMETER name:x index:0 type:.In.Z.create> - VALUE_PARAMETER name:y index:1 type:.In.Z.create> - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean + $this: VALUE_PARAMETER name: type:.Z + VALUE_PARAMETER name:x index:0 type:.In.Z.create> + VALUE_PARAMETER name:y index:1 type:.In.Z.create> + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int overridden: public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String overridden: public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any CLASS INTERFACE name:IA modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.IA - FUN name:foo visibility:public modality:ABSTRACT <> ($this:.IA) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.IA - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.IA + FUN name:foo visibility:public modality:ABSTRACT <> ($this:.IA) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.IA + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int overridden: public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String overridden: public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any CLASS INTERFACE name:IB modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.IB - FUN name:bar visibility:public modality:ABSTRACT <> ($this:.IB) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.IB - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.IB + FUN name:bar visibility:public modality:ABSTRACT <> ($this:.IB) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.IB + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int overridden: public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String overridden: public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:test visibility:public modality:FINAL <> (a:.In<.IA>, b:.In<.IB>, z:.Z) returnType:kotlin.Unit - VALUE_PARAMETER name:a index:0 type:.In<.IA> - VALUE_PARAMETER name:b index:1 type:.In<.IB> - VALUE_PARAMETER name:z index:2 type:.Z + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:test visibility:public modality:FINAL <> (a:.In<.IA>, b:.In<.IB>, z:.Z) returnType:kotlin.Unit + VALUE_PARAMETER name:a index:0 type:.In<.IA> + VALUE_PARAMETER name:b index:1 type:.In<.IB> + VALUE_PARAMETER name:z index:2 type:.Z BLOCK_BODY CALL 'public abstract fun foo (): kotlin.Unit declared in .IA' type=kotlin.Unit origin=null $this: TYPE_OP type=.IA origin=IMPLICIT_CAST typeOperand=.IA @@ -110,7 +110,7 @@ FILE fqName: fileName:/localVariableOfIntersectionType.kt $this: GET_VAR 'z: .Z declared in .test' type=.Z origin=null x: GET_VAR 'a: .In<.IA> declared in .test' type=.In<.IA> origin=null y: GET_VAR 'b: .In<.IB> declared in .test' type=.In<.IB> origin=null - VAR name:t type:kotlin.Any [val] + VAR name:t type:kotlin.Any [val] TYPE_OP type=kotlin.Any origin=IMPLICIT_CAST typeOperand=kotlin.Any CALL 'public abstract fun (): T of .Inv declared in .Inv' type=kotlin.Any origin=GET_PROPERTY $this: CALL 'public abstract fun create (x: .In.Z.create>, y: .In.Z.create>): .Inv.Z.create> declared in .Z' type=.Inv origin=null