From af60681705d29f08c7461df2078b5be8b47318bc Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Thu, 13 Apr 2023 15:11:56 +0300 Subject: [PATCH] [FIR] Save declarations in metadata in source order ^KT-54792 Fixed ^KT-54801 ^KT-54800 --- .../symbolByPsi/typeAnnotations.pretty.txt | 2 +- .../fir/serialization/FirElementSerializer.kt | 96 +++++++++++++------ ...LightTreeBlackBoxCodegenTestGenerated.java | 6 ++ .../FirPsiBlackBoxCodegenTestGenerated.java | 6 ++ .../reflection/properties/propertyOrder.kt | 49 ++++++++++ .../tests/dataClasses/repeatedProperties.txt | 1 + .../typeVariableAfterBuildMap.fir.kt.txt | 1 - ...r.txt => ClassLiteralArguments.fir.k1.txt} | 0 .../ClassLiteralArguments.fir.k2.txt | 21 ++++ ...txt => PrimitiveArrayArguments.fir.k1.txt} | 0 .../PrimitiveArrayArguments.fir.k2.txt | 33 +++++++ ...r.txt => WithMultipleArguments.fir.k1.txt} | 0 .../classes/WithMultipleArguments.fir.k2.txt | 18 ++++ .../ExtensionsWithSameNameClass.fir.k2.txt | 6 +- ...ir.txt => ClassLiteralArgument.fir.k1.txt} | 1 - .../types/ClassLiteralArgument.fir.k2.txt | 40 ++++++++ .../PropertyAndAccessor.fir.k2.txt | 8 +- ...fir.txt => ClassMemberConflict.fir.k1.txt} | 0 .../class/ClassMemberConflict.fir.k2.txt | 85 ++++++++++++++++ ...xt => DifferentGetterAndSetter.fir.k1.txt} | 0 .../DifferentGetterAndSetter.fir.k2.txt | 8 ++ ....txt => JavaBeanAbstractGetter.fir.k1.txt} | 0 .../JavaBeanAbstractGetter.fir.k2.txt | 6 ++ ...oSetters.fir.txt => TwoSetters.fir.k1.txt} | 0 .../class/javaBean/TwoSetters.fir.k2.txt | 8 ++ .../classObjectInClassStaticFields.fir.k2.txt | 6 +- .../classObjectInTraitStaticFields.fir.k2.txt | 6 +- ...eritMethodsDifferentReturnTypes.fir.k2.txt | 8 +- ...hodsDifferentReturnTypesGeneric.fir.k2.txt | 8 +- ....fir.txt => PropertyArrayTypes.fir.k1.txt} | 0 .../PropertyArrayTypes.fir.k2.txt | 16 ++++ ...ir.txt => WrongFieldMutability.fir.k1.txt} | 0 .../error/WrongFieldMutability.fir.k2.txt | 11 +++ .../PropagateTypeArgumentNullable.fir.k2.txt | 16 ++-- .../ChangeProjectionKind1.fir.k2.txt | 4 +- .../ChangeProjectionKind2.fir.k2.txt | 4 +- ...DeeplySubstitutedClassParameter.fir.k2.txt | 4 +- ...eeplySubstitutedClassParameter2.fir.k2.txt | 4 +- .../parameter/InheritMutability.fir.k2.txt | 4 +- .../parameter/InheritNotVararg.fir.k2.txt | 4 +- .../InheritNotVarargInteger.fir.k2.txt | 4 +- .../InheritNotVarargNotNull.fir.k2.txt | 4 +- .../InheritNotVarargPrimitive.fir.k2.txt | 4 +- .../parameter/InheritNullability.fir.k2.txt | 4 +- .../InheritProjectionKind.fir.k2.txt | 4 +- .../parameter/InheritReadOnliness.fir.k2.txt | 4 +- .../parameter/InheritVararg.fir.k2.txt | 4 +- .../parameter/InheritVarargInteger.fir.k2.txt | 4 +- .../parameter/InheritVarargNotNull.fir.k2.txt | 4 +- .../InheritVarargPrimitive.fir.k2.txt | 4 +- .../propagation/parameter/Kt3302.fir.k2.txt | 8 +- .../parameter/MutableToReadOnly.fir.k2.txt | 4 +- .../parameter/NotNullToNullable.fir.k2.txt | 4 +- .../parameter/NullableToNotNull.fir.k2.txt | 4 +- ...ullableToNotNullKotlinSignature.fir.k2.txt | 4 +- .../OverrideWithErasedParameter.fir.k2.txt | 4 +- .../parameter/ReadOnlyToMutable.fir.k2.txt | 4 +- .../SubclassFromGenericAndNot.fir.k2.txt | 8 +- .../SubstitutedClassParameter.fir.k2.txt | 4 +- .../SubstitutedClassParameters.fir.k2.txt | 8 +- .../return/AddNotNullJavaSubtype.fir.k2.txt | 4 +- .../return/AddNotNullSameJavaType.fir.k2.txt | 4 +- .../AddNullabilityJavaSubtype.fir.k2.txt | 4 +- .../AddNullabilitySameGenericType1.fir.k2.txt | 4 +- .../AddNullabilitySameGenericType2.fir.k2.txt | 4 +- .../AddNullabilitySameJavaType.fir.k2.txt | 4 +- .../CantMakeImmutableInSubclass.fir.k2.txt | 4 +- ...DeeplySubstitutedClassParameter.fir.k2.txt | 4 +- ...eeplySubstitutedClassParameter2.fir.k2.txt | 4 +- .../HalfSubstitutedTypeParameters.fir.k2.txt | 4 +- ...ullabilityGenericSubclassSimple.fir.k2.txt | 4 +- .../InheritNullabilityJavaSubtype.fir.k2.txt | 4 +- ...heritNullabilitySameGenericType.fir.k2.txt | 4 +- .../InheritNullabilitySameJavaType.fir.k2.txt | 4 +- .../return/InheritProjectionKind.fir.k2.txt | 4 +- .../InheritReadOnlinessOfArgument.fir.k2.txt | 4 +- .../InheritReadOnlinessSameClass.fir.k2.txt | 4 +- .../InheritReadOnlinessSubclass.fir.k2.txt | 4 +- .../return/SameProjectionKind.fir.k2.txt | 4 +- .../SubclassFromGenericAndNot.fir.k2.txt | 8 +- .../SubstitutedClassParameter.fir.k2.txt | 4 +- .../SubstitutedClassParameters.fir.k2.txt | 8 +- ...assesConflictingProjectionKinds.fir.k2.txt | 8 +- ...iantAndCovariantInferMutability.fir.k2.txt | 8 +- ...antAndCovariantInferNullability.fir.k2.txt | 8 +- .../TwoSuperclassesMutableAndNot.fir.k2.txt | 8 +- ...woSuperclassesReturnJavaSubtype.fir.k2.txt | 8 +- ...oSuperclassesReturnSameJavaType.fir.k2.txt | 8 +- ...woSuperclassesSupplementNotNull.fir.k2.txt | 8 +- .../return/TypeParamOfClass.fir.k2.txt | 4 +- .../TypeParamOfClassSubstituted.fir.k2.txt | 4 +- .../return/TypeParamOfFun.fir.k2.txt | 4 +- ...rentReturnTypesAndVisibilities.fir.k1.txt} | 1 - ...erentReturnTypesAndVisibilities.fir.k2.txt | 16 ++++ ...r.txt => PropagateDeepSubclass.fir.k1.txt} | 0 .../fun/PropagateDeepSubclass.fir.k2.txt | 18 ++++ .../memberOrder/extensionMembers.fir.k2.txt | 16 ++-- .../extensionPropertiesNameClash.fir.k2.txt | 19 ---- ...t => extensionPropertiesNameClash.fir.txt} | 0 ...ic.fir.txt => deepInnerGeneric.fir.k1.txt} | 0 .../nestedClasses/deepInnerGeneric.fir.k2.txt | 23 +++++ .../ClassVarWithSet.fir.k2.txt | 16 ++-- .../visibility/PrivateClassMembers.fir.k2.txt | 8 +- ...oThis.fir.txt => PrivateToThis.fir.k1.txt} | 0 .../visibility/PrivateToThis.fir.k2.txt | 20 ++++ ...r.txt => PropertyInConstructor.fir.k1.txt} | 0 .../PropertyInConstructor.fir.k2.txt | 27 ++++++ ...nConstructorExplicitVisibility.fir.k1.txt} | 0 ...InConstructorExplicitVisibility.fir.k2.txt | 27 ++++++ ... => WithUnsignedTypeParameters.fir.k1.txt} | 0 .../WithUnsignedTypeParameters.fir.k2.txt | 39 ++++++++ .../memberOrder/ExtensionMembers.fir.txt | 21 ++-- ...erable.fir.txt => LoadIterable.fir.k1.txt} | 0 .../mutability/LoadIterable.fir.k2.txt | 10 ++ ...=> LoadIterableWithNullability.fir.k1.txt} | 0 .../LoadIterableWithNullability.fir.k2.txt | 10 ++ ...=> LoadIterableWithPropagation.fir.k1.txt} | 0 .../LoadIterableWithPropagation.fir.k2.txt | 26 +++++ .../builtinsSerializer/propertiesOrder.kt | 11 +++ .../builtinsSerializer/propertiesOrder.txt | 11 +++ .../IrBlackBoxCodegenTestGenerated.java | 6 ++ ...kBoxCodegenWithIrInlinerTestGenerated.java | 6 ++ .../testData/klibContents/annotations.txt | 2 +- .../annotations_source_retention.txt | 2 +- .../annotationArguments/primitiveArrays.txt | 2 +- .../annotationArguments/primitives.txt | 2 +- .../compileTimeConstants.txt | 2 +- .../nestedClassesAndObjects.txt | 2 +- 128 files changed, 833 insertions(+), 256 deletions(-) create mode 100644 compiler/testData/codegen/box/reflection/properties/propertyOrder.kt rename compiler/testData/loadJava/compiledKotlin/annotations/{ClassLiteralArguments.fir.txt => ClassLiteralArguments.fir.k1.txt} (100%) create mode 100644 compiler/testData/loadJava/compiledKotlin/annotations/ClassLiteralArguments.fir.k2.txt rename compiler/testData/loadJava/compiledKotlin/annotations/{PrimitiveArrayArguments.fir.txt => PrimitiveArrayArguments.fir.k1.txt} (100%) create mode 100644 compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.fir.k2.txt rename compiler/testData/loadJava/compiledKotlin/annotations/classes/{WithMultipleArguments.fir.txt => WithMultipleArguments.fir.k1.txt} (100%) create mode 100644 compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.fir.k2.txt rename compiler/testData/loadJava/compiledKotlin/annotations/types/{ClassLiteralArgument.fir.txt => ClassLiteralArgument.fir.k1.txt} (99%) create mode 100644 compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.fir.k2.txt rename compiler/testData/loadJava/compiledKotlin/class/{ClassMemberConflict.fir.txt => ClassMemberConflict.fir.k1.txt} (100%) create mode 100644 compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.fir.k2.txt rename compiler/testData/loadJava/compiledKotlin/class/javaBean/{DifferentGetterAndSetter.fir.txt => DifferentGetterAndSetter.fir.k1.txt} (100%) create mode 100644 compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.fir.k2.txt rename compiler/testData/loadJava/compiledKotlin/class/javaBean/{JavaBeanAbstractGetter.fir.txt => JavaBeanAbstractGetter.fir.k1.txt} (100%) create mode 100644 compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.fir.k2.txt rename compiler/testData/loadJava/compiledKotlin/class/javaBean/{TwoSetters.fir.txt => TwoSetters.fir.k1.txt} (100%) create mode 100644 compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.fir.k2.txt rename compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/{PropertyArrayTypes.fir.txt => PropertyArrayTypes.fir.k1.txt} (100%) create mode 100644 compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.fir.k2.txt rename compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/{WrongFieldMutability.fir.txt => WrongFieldMutability.fir.k1.txt} (100%) create mode 100644 compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.fir.k2.txt rename compiler/testData/loadJava/compiledKotlin/fun/{InheritMethodsDifferentReturnTypesAndVisibilities.fir.txt => InheritMethodsDifferentReturnTypesAndVisibilities.fir.k1.txt} (99%) create mode 100644 compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.fir.k2.txt rename compiler/testData/loadJava/compiledKotlin/fun/{PropagateDeepSubclass.fir.txt => PropagateDeepSubclass.fir.k1.txt} (100%) create mode 100644 compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.fir.k2.txt delete mode 100644 compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.fir.k2.txt rename compiler/testData/loadJava/compiledKotlin/memberOrder/{extensionPropertiesNameClash.fir.k1.txt => extensionPropertiesNameClash.fir.txt} (100%) rename compiler/testData/loadJava/compiledKotlin/nestedClasses/{deepInnerGeneric.fir.txt => deepInnerGeneric.fir.k1.txt} (100%) create mode 100644 compiler/testData/loadJava/compiledKotlin/nestedClasses/deepInnerGeneric.fir.k2.txt rename compiler/testData/loadJava/compiledKotlin/visibility/{PrivateToThis.fir.txt => PrivateToThis.fir.k1.txt} (100%) create mode 100644 compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.fir.k2.txt rename compiler/testData/loadJava/compiledKotlin/visibility/{PropertyInConstructor.fir.txt => PropertyInConstructor.fir.k1.txt} (100%) create mode 100644 compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.fir.k2.txt rename compiler/testData/loadJava/compiledKotlin/visibility/{PropertyInConstructorExplicitVisibility.fir.txt => PropertyInConstructorExplicitVisibility.fir.k1.txt} (100%) create mode 100644 compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.fir.k2.txt rename compiler/testData/loadJava/compiledKotlinWithStdlib/annotations/{WithUnsignedTypeParameters.fir.txt => WithUnsignedTypeParameters.fir.k1.txt} (100%) create mode 100644 compiler/testData/loadJava/compiledKotlinWithStdlib/annotations/WithUnsignedTypeParameters.fir.k2.txt rename compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/{LoadIterable.fir.txt => LoadIterable.fir.k1.txt} (100%) create mode 100644 compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.fir.k2.txt rename compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/{LoadIterableWithNullability.fir.txt => LoadIterableWithNullability.fir.k1.txt} (100%) create mode 100644 compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.fir.k2.txt rename compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/{LoadIterableWithPropagation.fir.txt => LoadIterableWithPropagation.fir.k1.txt} (100%) create mode 100644 compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.fir.k2.txt create mode 100644 compiler/testData/serialization/builtinsSerializer/propertiesOrder.kt create mode 100644 compiler/testData/serialization/builtinsSerializer/propertiesOrder.txt diff --git a/analysis/analysis-api/testData/symbols/symbolByPsi/typeAnnotations.pretty.txt b/analysis/analysis-api/testData/symbols/symbolByPsi/typeAnnotations.pretty.txt index c00deb096cc..da89ca4f0fe 100644 --- a/analysis/analysis-api/testData/symbols/symbolByPsi/typeAnnotations.pretty.txt +++ b/analysis/analysis-api/testData/symbols/symbolByPsi/typeAnnotations.pretty.txt @@ -25,4 +25,4 @@ class X : @Anno1 I { fun f(arg: @Anno2 I): @Anno3 I val x: @Anno4 I -} \ No newline at end of file +} diff --git a/compiler/fir/fir-serialization/src/org/jetbrains/kotlin/fir/serialization/FirElementSerializer.kt b/compiler/fir/fir-serialization/src/org/jetbrains/kotlin/fir/serialization/FirElementSerializer.kt index 9341c92d2ee..ab978502e9a 100644 --- a/compiler/fir/fir-serialization/src/org/jetbrains/kotlin/fir/serialization/FirElementSerializer.kt +++ b/compiler/fir/fir-serialization/src/org/jetbrains/kotlin/fir/serialization/FirElementSerializer.kt @@ -17,6 +17,7 @@ import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget import org.jetbrains.kotlin.fir.* import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.comparators.FirCallableDeclarationComparator +import org.jetbrains.kotlin.fir.declarations.comparators.FirMemberDeclarationComparator import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyAccessor import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyGetter import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertySetter @@ -56,6 +57,7 @@ import org.jetbrains.kotlin.types.ConstantValueKind import org.jetbrains.kotlin.types.TypeApproximatorConfiguration import org.jetbrains.kotlin.utils.addIfNotNull import org.jetbrains.kotlin.utils.addToStdlib.runIf +import org.jetbrains.kotlin.utils.mapToIndex class FirElementSerializer private constructor( private val session: FirSession, @@ -160,19 +162,38 @@ class FirElementSerializer private constructor( } } + + /* + * Order of constructors: + * - declared constructors in declaration order + * - generated constructors in sorted order + * - provided constructors in sorted order + */ if (regularClass != null && regularClass.classKind != ClassKind.ENUM_ENTRY) { for (constructor in regularClass.constructors()) { builder.addConstructor(constructorProto(constructor)) } - for (constructor in providedDeclarationsService.getProvidedConstructors(classSymbol, scopeSession)) { + val providedConstructors = providedDeclarationsService + .getProvidedConstructors(classSymbol, scopeSession) + .sortedWith(FirCallableDeclarationComparator) + for (constructor in providedConstructors) { builder.addConstructor(constructorProto(constructor)) } } - val callableMembers = (klass.memberDeclarations() + providedDeclarationsService.getProvidedCallables(classSymbol, scopeSession)) + val providedCallables = providedDeclarationsService + .getProvidedCallables(classSymbol, scopeSession) .sortedWith(FirCallableDeclarationComparator) + /* + * Order of callables: + * - declared callable in declaration order + * - generated callable in sorted order + * - provided callable in sorted order + */ + val callableMembers = (klass.memberDeclarations() + providedCallables) + for (declaration in callableMembers) { if (declaration !is FirEnumEntry && declaration.isStatic) continue // ??? Miss values() & valueOf() when (declaration) { @@ -263,11 +284,26 @@ class FirElementSerializer private constructor( return builder } + /* + * Order of nested classifiers: + * - declared classifiers in declaration order + * - generated classifiers in sorted order + * - provided classifiers in sorted order + */ fun computeNestedClassifiersForClass(classSymbol: FirClassSymbol<*>): List> { val scope = session.nestedClassifierScope(classSymbol.fir) ?: return emptyList() return buildList { - scope.getClassifierNames().mapNotNullTo(this) { scope.getSingleClassifier(it) } - addAll(providedDeclarationsService.getProvidedNestedClassifiers(classSymbol, scopeSession)) + val indexByDeclaration = classSymbol.fir.declarations.filterIsInstance().mapToIndex() + val (declared, nonDeclared) = scope.getClassifierNames() + .mapNotNull { scope.getSingleClassifier(it)?.fir as FirClassLikeDeclaration? } + .partition { it in indexByDeclaration } + declared.sortedBy { indexByDeclaration.getValue(it) }.mapTo(this) { it.symbol } + nonDeclared.sortedWith(FirMemberDeclarationComparator).mapTo(this) { it.symbol } + + providedDeclarationsService.getProvidedNestedClassifiers(classSymbol, scopeSession) + .map { it.fir } + .sortedWith(FirMemberDeclarationComparator) + .mapTo(this) { it.symbol } } } @@ -286,37 +322,43 @@ class FirElementSerializer private constructor( private inline fun > FirClass.collectDeclarations( processScope: (FirTypeScope, ((S) -> Unit)) -> Unit - ): List = buildList { - val memberScope = unsubstitutedScope(session, scopeSession, withForcedTypeCalculator = false, memberRequiredPhase = null) - - processScope(memberScope) l@{ - val declaration = it.fir as T - val dispatchReceiverLookupTag = declaration.dispatchReceiverClassLookupTagOrNull() - // Special case for data/value class equals/hashCode/toString, see KT-57510 - val isOverrideOfAnyFunctionInDataOrValueClass = this@collectDeclarations is FirRegularClass && - (this@collectDeclarations.isData || this@collectDeclarations.isInline) && - dispatchReceiverLookupTag?.classId == StandardClassIds.Any && !declaration.isFinal - if (declaration.isSubstitutionOrIntersectionOverride) { - if (!isOverrideOfAnyFunctionInDataOrValueClass) { - return@l - } - } else if (!(declaration.isStatic || declaration is FirConstructor)) { - // non-intersection or substitution fake override - if (dispatchReceiverLookupTag != this@collectDeclarations.symbol.toLookupTag()) { + ): List { + val foundInScope = buildList { + val memberScope = unsubstitutedScope(session, scopeSession, withForcedTypeCalculator = false, memberRequiredPhase = null) + processScope(memberScope) l@{ + val declaration = it.fir as T + val dispatchReceiverLookupTag = declaration.dispatchReceiverClassLookupTagOrNull() + // Special case for data/value class equals/hashCode/toString, see KT-57510 + val isOverrideOfAnyFunctionInDataOrValueClass = this@collectDeclarations is FirRegularClass && + (this@collectDeclarations.isData || this@collectDeclarations.isInline) && + dispatchReceiverLookupTag?.classId == StandardClassIds.Any && !declaration.isFinal + if (declaration.isSubstitutionOrIntersectionOverride) { if (!isOverrideOfAnyFunctionInDataOrValueClass) { return@l } + } else if (!(declaration.isStatic || declaration is FirConstructor)) { + // non-intersection or substitution fake override + if (dispatchReceiverLookupTag != this@collectDeclarations.symbol.toLookupTag()) { + if (!isOverrideOfAnyFunctionInDataOrValueClass) { + return@l + } + } } - } - add(declaration) - } - - for (declaration in declarations) { - if (declaration is T && declaration.isStatic) { add(declaration) } + + for (declaration in declarations) { + if (declaration is T && declaration.isStatic) { + add(declaration) + } + } } + val indexByDeclaration = declarations.filterIsInstance().mapToIndex() + val (declared, nonDeclared) = foundInScope + .sortedBy { indexByDeclaration[it] ?: Int.MAX_VALUE } + .partition { it in indexByDeclaration } + return declared + nonDeclared.sortedWith(FirCallableDeclarationComparator) } private fun FirPropertyAccessor.nonSourceAnnotations(session: FirSession): List = diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java index 7e72d7078f4..0ce2e98d08e 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java @@ -45880,6 +45880,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/reflection/properties/propertyOfNestedClassAndArrayType.kt"); } + @Test + @TestMetadata("propertyOrder.kt") + public void testPropertyOrder() throws Exception { + runTest("compiler/testData/codegen/box/reflection/properties/propertyOrder.kt"); + } + @Test @TestMetadata("protectedClassVar.kt") public void testProtectedClassVar() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java index 489c629ca4d..bc62249fff9 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java @@ -45880,6 +45880,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/reflection/properties/propertyOfNestedClassAndArrayType.kt"); } + @Test + @TestMetadata("propertyOrder.kt") + public void testPropertyOrder() throws Exception { + runTest("compiler/testData/codegen/box/reflection/properties/propertyOrder.kt"); + } + @Test @TestMetadata("protectedClassVar.kt") public void testProtectedClassVar() throws Exception { diff --git a/compiler/testData/codegen/box/reflection/properties/propertyOrder.kt b/compiler/testData/codegen/box/reflection/properties/propertyOrder.kt new file mode 100644 index 00000000000..d4c662e6f81 --- /dev/null +++ b/compiler/testData/codegen/box/reflection/properties/propertyOrder.kt @@ -0,0 +1,49 @@ +// TARGET_BACKEND: JVM_IR +// WITH_STDLIB +// WITH_REFLECT +// FILE: B.java +public class B { + public final int c = 1; + public void bb() {} + public final int b = 2; + public final int a = 10; + public void aa() {} +} + +// FILE: main.kt +import kotlin.reflect.KClass +import kotlin.reflect.KFunction +import kotlin.reflect.KProperty + +class A { + val c = 1 + fun bb() {} + val b = 2 + val a = 10 + fun aa() {} +} + +fun listMembers(kClass: KClass<*>): String { + return kClass.members.joinToString(" | ") { member -> + val prefix = when (member) { + is KFunction -> "fun" + is KProperty -> "val" + else -> "wtf" + } + "$prefix ${member.name}" + } +} + +fun box(): String { + val aMembers = listMembers(A::class) + + // After migration of reflection to K2 the order will be following: + // "val c | val b | val a | fun bb | fun aa | fun equals | fun hashCode | fun toString" + if (aMembers != "val a | val b | val c | fun aa | fun bb | fun equals | fun hashCode | fun toString") return "Fail A: $aMembers" + +// Looks like property order is different on different JDK, so it's pointless to test it +// val bMembers = listMembers(B::class) +// if (bMembers != "fun aa | fun bb | val c | val b | val a | fun equals | fun hashCode | fun toString") return "Fail B: $bMembers" + + return "OK" +} diff --git a/compiler/testData/diagnostics/tests/dataClasses/repeatedProperties.txt b/compiler/testData/diagnostics/tests/dataClasses/repeatedProperties.txt index 81c566e8881..6fcf26ac126 100644 --- a/compiler/testData/diagnostics/tests/dataClasses/repeatedProperties.txt +++ b/compiler/testData/diagnostics/tests/dataClasses/repeatedProperties.txt @@ -39,3 +39,4 @@ public final data class A3 { public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/ir/irText/firProblems/typeVariableAfterBuildMap.fir.kt.txt b/compiler/testData/ir/irText/firProblems/typeVariableAfterBuildMap.fir.kt.txt index d6b34abc806..bf26d2c54dd 100644 --- a/compiler/testData/ir/irText/firProblems/typeVariableAfterBuildMap.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/typeVariableAfterBuildMap.fir.kt.txt @@ -173,4 +173,3 @@ object Visibilities { private get } - diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/ClassLiteralArguments.fir.txt b/compiler/testData/loadJava/compiledKotlin/annotations/ClassLiteralArguments.fir.k1.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlin/annotations/ClassLiteralArguments.fir.txt rename to compiler/testData/loadJava/compiledKotlin/annotations/ClassLiteralArguments.fir.k1.txt diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/ClassLiteralArguments.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/annotations/ClassLiteralArguments.fir.k2.txt new file mode 100644 index 00000000000..bfdf4fcafa2 --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/annotations/ClassLiteralArguments.fir.k2.txt @@ -0,0 +1,21 @@ +public final annotation class Anno : R|kotlin/Annotation| { + public final val klass: R|kotlin/reflect/KClass<*>| + public get(): R|kotlin/reflect/KClass<*>| + + public final val klasses: R|kotlin/Array>| + public get(): R|kotlin/Array>| + + public final val sarKlass: R|kotlin/reflect/KClass>| + public get(): R|kotlin/reflect/KClass>| + + public final val d2arKlass: R|kotlin/reflect/KClass>| + public get(): R|kotlin/reflect/KClass>| + + public constructor(klass: R|kotlin/reflect/KClass<*>|, klasses: R|kotlin/Array>|, sarKlass: R|kotlin/reflect/KClass>|, d2arKlass: R|kotlin/reflect/KClass>|): R|test/Anno| + +} + +@R|test/Anno|(klass = ((R|kotlin/String|)), klasses = (((R|kotlin/Int|)), ((R|kotlin/String|)), ((R|kotlin/Float|))), sarKlass = ((R|kotlin/String|)), d2arKlass = ((R|kotlin/DoubleArray|))) public final class Klass : R|kotlin/Any| { + public constructor(): R|test/Klass| + +} diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.fir.txt b/compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.fir.k1.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.fir.txt rename to compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.fir.k1.txt diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.fir.k2.txt new file mode 100644 index 00000000000..7408c35add0 --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.fir.k2.txt @@ -0,0 +1,33 @@ +public final annotation class Anno : R|kotlin/Annotation| { + public final val bytes: R|kotlin/ByteArray| + public get(): R|kotlin/ByteArray| + + public final val shorts: R|kotlin/ShortArray| + public get(): R|kotlin/ShortArray| + + public final val ints: R|kotlin/IntArray| + public get(): R|kotlin/IntArray| + + public final val longs: R|kotlin/LongArray| + public get(): R|kotlin/LongArray| + + public final val chars: R|kotlin/CharArray| + public get(): R|kotlin/CharArray| + + public final val floats: R|kotlin/FloatArray| + public get(): R|kotlin/FloatArray| + + public final val doubles: R|kotlin/DoubleArray| + public get(): R|kotlin/DoubleArray| + + public final val booleans: R|kotlin/BooleanArray| + public get(): R|kotlin/BooleanArray| + + public constructor(bytes: R|kotlin/ByteArray|, shorts: R|kotlin/ShortArray|, ints: R|kotlin/IntArray|, longs: R|kotlin/LongArray|, chars: R|kotlin/CharArray|, floats: R|kotlin/FloatArray|, doubles: R|kotlin/DoubleArray|, booleans: R|kotlin/BooleanArray|): R|test/Anno| + +} + +@R|test/Anno|(bytes = (Byte(42), Byte(-1)), shorts = (Short(-42), Short(0)), ints = (Int(42), Int(239)), longs = (Long(42), Long(239)), chars = (Char(a), Char(Z)), floats = (Float(2.72), Float(0.0)), doubles = (Double(42.0), Double(-3.14)), booleans = (Boolean(true), Boolean(false))) public final class Klass : R|kotlin/Any| { + public constructor(): R|test/Klass| + +} diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.fir.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.fir.k1.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.fir.txt rename to compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.fir.k1.txt diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.fir.k2.txt new file mode 100644 index 00000000000..a0e20e5cc56 --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.fir.k2.txt @@ -0,0 +1,18 @@ +public final annotation class Anno : R|kotlin/Annotation| { + public final val int: R|kotlin/Int| + public get(): R|kotlin/Int| + + public final val string: R|kotlin/String| + public get(): R|kotlin/String| + + public final val double: R|kotlin/Double| + public get(): R|kotlin/Double| + + public constructor(int: R|kotlin/Int|, string: R|kotlin/String|, double: R|kotlin/Double|): R|test/Anno| + +} + +@R|test/Anno|(int = Int(42), string = String(OK), double = Double(3.14)) public final class Class : R|kotlin/Any| { + public constructor(): R|test/Class| + +} diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.fir.k2.txt index d0c710015fd..eb7fd732f27 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.fir.k2.txt @@ -2,12 +2,12 @@ public final class Class : R|kotlin/Any| { @PROPERTY:R|test/IntAnno|() public final val R|kotlin/Int|.extension: R|kotlin/Int| public get(): R|kotlin/Int| - @PROPERTY:R|test/DoubleAnno|() public final val R|kotlin/Double|.extension: R|kotlin/Int| - public get(): R|kotlin/Int| - @PROPERTY:R|test/StringAnno|() public final val R|kotlin/String|.extension: R|kotlin/String| public get(): R|kotlin/String| + @PROPERTY:R|test/DoubleAnno|() public final val R|kotlin/Double|.extension: R|kotlin/Int| + public get(): R|kotlin/Int| + public constructor(): R|test/Class| } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.fir.txt b/compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.fir.k1.txt similarity index 99% rename from compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.fir.txt rename to compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.fir.k1.txt index 1ff14df58e5..b3e1617b43b 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.fir.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.fir.k1.txt @@ -38,4 +38,3 @@ public final class Simple : R|kotlin/Any| { public constructor(): R|test/Simple| } - diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.fir.k2.txt new file mode 100644 index 00000000000..895810f342c --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.fir.k2.txt @@ -0,0 +1,40 @@ +public final class A : R|kotlin/Any| { + public final fun simple(s: R|@R|test/Ann|(klass = ((R|test/Simple|))) kotlin/String|): R|kotlin/Unit| + + public final fun generic(s: R|@R|test/Ann|(klass = ((R|test/Generic|))) kotlin/String|): R|kotlin/Unit| + + public final fun innerGeneric(s: R|@R|test/Ann|(klass = ((R|test/InnerGeneric.Inner|))) kotlin/String|): R|kotlin/Unit| + + public final fun arrays(s: R|@R|test/Ann|(klass = ((R|kotlin/Int|))) kotlin/Array|, t: R|@R|test/Ann|(klass = ((R|kotlin/IntArray|))) kotlin/Array|, u: R|@R|test/Ann|(klass = ((R|kotlin/Int|))) kotlin/Array>|, v: R|@R|test/Ann|(klass = ((R|kotlin/String|))) kotlin/Array>>|): R|kotlin/Unit| + + public constructor(): R|test/A| + +} + +@R|kotlin/annotation/Target|(allowedTargets = (R|kotlin/annotation/AnnotationTarget.TYPE|)) public final annotation class Ann : R|kotlin/Annotation| { + public final val klass: R|kotlin/reflect/KClass<*>| + public get(): R|kotlin/reflect/KClass<*>| + + public constructor(klass: R|kotlin/reflect/KClass<*>|): R|test/Ann| + +} + +public final class Generic : R|kotlin/Any| { + public constructor(): R|test/Generic| + +} + +public final class InnerGeneric : R|kotlin/Any| { + public constructor(): R|test/InnerGeneric| + + public final inner class Inner : R|kotlin/Any| { + public test/InnerGeneric.constructor(): R|test/InnerGeneric.Inner| + + } + +} + +public final class Simple : R|kotlin/Any| { + public constructor(): R|test/Simple| + +} diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/PropertyAndAccessor.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/PropertyAndAccessor.fir.k2.txt index 122cd659ba2..11963640342 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/PropertyAndAccessor.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/PropertyAndAccessor.fir.k2.txt @@ -15,10 +15,6 @@ public final annotation class B : R|kotlin/Annotation| { } public abstract interface I : R|kotlin/Any| { - public abstract var getterAndSetter: R|kotlin/Int| - @R|test/A|(value = String(getter)) public get(): R|kotlin/Int| - @R|test/B|(value = (String(setter))) public set(value: R|kotlin/Int|): R|kotlin/Unit| - @PROPERTY:R|test/A|(value = String(property)) public abstract var propertyAndGetter: R|kotlin/Int| @R|test/B|(value = (String(getter))) public get(): R|kotlin/Int| public set(value: R|kotlin/Int|): R|kotlin/Unit| @@ -27,4 +23,8 @@ public abstract interface I : R|kotlin/Any| { public get(): R|kotlin/Int| @R|test/B|(value = (String(setter))) public set(value: R|kotlin/Int|): R|kotlin/Unit| + public abstract var getterAndSetter: R|kotlin/Int| + @R|test/A|(value = String(getter)) public get(): R|kotlin/Int| + @R|test/B|(value = (String(setter))) public set(value: R|kotlin/Int|): R|kotlin/Unit| + } diff --git a/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.fir.txt b/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.fir.k1.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.fir.txt rename to compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.fir.k1.txt diff --git a/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.fir.k2.txt new file mode 100644 index 00000000000..3a74e3370b4 --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.fir.k2.txt @@ -0,0 +1,85 @@ +public final class ConstructorTypeParamClassObjectConflict : R|kotlin/Any| { + public final val some: R|kotlin/Int| + public get(): R|kotlin/Int| + + public constructor(): R|test/ConstructorTypeParamClassObjectConflict| + + public final companion object Companion : R|kotlin/Any| { + public final val test: R|kotlin/Int| + public get(): R|kotlin/Int| + + private constructor(): R|test/ConstructorTypeParamClassObjectConflict.Companion| + + } + +} + +public final class ConstructorTypeParamClassObjectTypeConflict : R|kotlin/Any| { + public final val some: R|test?| + public get(): R|test?| + + public constructor(): R|test/ConstructorTypeParamClassObjectTypeConflict| + + public final companion object Companion : R|kotlin/Any| { + private constructor(): R|test/ConstructorTypeParamClassObjectTypeConflict.Companion| + + public abstract interface test : R|kotlin/Any| { + } + + } + +} + +public final class TestClassObjectAndClassConflict : R|kotlin/Any| { + public final val bla: R|kotlin/String| + public get(): R|kotlin/String| + + public final val some: R|kotlin/String| + public get(): R|kotlin/String| + + public constructor(): R|test/TestClassObjectAndClassConflict| + + public final companion object Companion : R|kotlin/Any| { + public final val bla: R|kotlin/Int| + public get(): R|kotlin/Int| + + private constructor(): R|test/TestClassObjectAndClassConflict.Companion| + + } + +} + +public final class TestConstructorParamClassObjectConflict : R|kotlin/Any| { + public final val some: R|kotlin/String| + public get(): R|kotlin/String| + + public constructor(test: R|kotlin/String|): R|test/TestConstructorParamClassObjectConflict| + + public final companion object Companion : R|kotlin/Any| { + public final val test: R|kotlin/Int| + public get(): R|kotlin/Int| + + private constructor(): R|test/TestConstructorParamClassObjectConflict.Companion| + + } + +} + +public final class TestConstructorValClassObjectConflict : R|kotlin/Any| { + public final val test: R|kotlin/String| + public get(): R|kotlin/String| + + public final val some: R|kotlin/String| + public get(): R|kotlin/String| + + public constructor(test: R|kotlin/String|): R|test/TestConstructorValClassObjectConflict| + + public final companion object Companion : R|kotlin/Any| { + public final val test: R|kotlin/Int| + public get(): R|kotlin/Int| + + private constructor(): R|test/TestConstructorValClassObjectConflict.Companion| + + } + +} diff --git a/compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.fir.txt b/compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.fir.k1.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.fir.txt rename to compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.fir.k1.txt diff --git a/compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.fir.k2.txt new file mode 100644 index 00000000000..7ab0dce8977 --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.fir.k2.txt @@ -0,0 +1,8 @@ +public open class DifferentGetterAndSetter : R|kotlin/Any| { + public open fun setSomething(p0: R|kotlin/String?|): R|kotlin/Unit| + + public open fun getSomething(): R|kotlin/Int| + + public constructor(): R|test/DifferentGetterAndSetter| + +} diff --git a/compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.fir.txt b/compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.fir.k1.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.fir.txt rename to compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.fir.k1.txt diff --git a/compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.fir.k2.txt new file mode 100644 index 00000000000..4e0efc2813a --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.fir.k2.txt @@ -0,0 +1,6 @@ +public abstract interface JavaBeanAbstractGetter : R|kotlin/Any| { + public abstract fun getRed(): R|kotlin/Int| + + public abstract fun getBlue(): R|kotlin/Int| + +} diff --git a/compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.fir.txt b/compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.fir.k1.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.fir.txt rename to compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.fir.k1.txt diff --git a/compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.fir.k2.txt new file mode 100644 index 00000000000..55956439bb8 --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.fir.k2.txt @@ -0,0 +1,8 @@ +public open class TwoSetters : R|kotlin/Any| { + public open fun setSize(p0: R|kotlin/String?|): R|kotlin/Unit| + + public open fun setSize(p0: R|kotlin/Int|): R|kotlin/Unit| + + public constructor(): R|test/TwoSetters| + +} diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.fir.k2.txt index 0db53b016cd..0c1303e2cc3 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.fir.k2.txt @@ -4,9 +4,6 @@ public final class Test : R|kotlin/Any| { public final companion object Companion : R|kotlin/Any| { public final fun incProp4(): R|kotlin/Unit| - public final const val constProp8: R|kotlin/Int| = Int(80) - public get(): R|kotlin/Int| - public final val prop1: R|kotlin/Int| public get(): R|kotlin/Int| @@ -29,6 +26,9 @@ public final class Test : R|kotlin/Any| { public get(): R|kotlin/Int| public set(i: R|kotlin/Int|): R|kotlin/Unit| + public final const val constProp8: R|kotlin/Int| = Int(80) + public get(): R|kotlin/Int| + private constructor(): R|test/Test.Companion| } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.fir.k2.txt index c5477e01290..7026a18a196 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.fir.k2.txt @@ -2,9 +2,6 @@ public abstract interface Test : R|kotlin/Any| { public final companion object Companion : R|kotlin/Any| { public final fun incProp4(): R|kotlin/Unit| - public final const val constProp8: R|kotlin/Int| = Int(80) - public get(): R|kotlin/Int| - public final val prop1: R|kotlin/Int| public get(): R|kotlin/Int| @@ -27,6 +24,9 @@ public abstract interface Test : R|kotlin/Any| { public get(): R|kotlin/Int| public set(i: R|kotlin/Int|): R|kotlin/Unit| + public final const val constProp8: R|kotlin/Int| = Int(80) + public get(): R|kotlin/Int| + private constructor(): R|test/Test.Companion| } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.fir.k2.txt index 29f4cdb9e6e..a065db22be4 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.fir.k2.txt @@ -2,17 +2,17 @@ public final class InheritMethodsDifferentReturnTypes : R|kotlin/Any| { public constructor(): R|test/InheritMethodsDifferentReturnTypes| public abstract interface Super1 : R|kotlin/Any| { - public abstract fun bar(): R|kotlin/String?| - public abstract fun foo(): R|kotlin/CharSequence?| + public abstract fun bar(): R|kotlin/String?| + } public abstract interface Super2 : R|kotlin/Any| { - public abstract fun bar(): R|kotlin/CharSequence?| - public abstract fun foo(): R|kotlin/String?| + public abstract fun bar(): R|kotlin/CharSequence?| + } public abstract interface Sub : R|test/InheritMethodsDifferentReturnTypes.Super1|, R|test/InheritMethodsDifferentReturnTypes.Super2| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.fir.k2.txt index 1b6b2e27103..3992aaf3dae 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.fir.k2.txt @@ -2,17 +2,17 @@ public final class InheritMethodsDifferentReturnTypesGeneric : R|kotlin/Any| { public constructor(): R|test/InheritMethodsDifferentReturnTypesGeneric| public abstract interface Super1 : R|kotlin/Any| { - public abstract fun bar(): R|B?| - public abstract fun foo(): R|F?| + public abstract fun bar(): R|B?| + } public abstract interface Super2 : R|kotlin/Any| { - public abstract fun bar(): R|BB?| - public abstract fun foo(): R|FF?| + public abstract fun bar(): R|BB?| + } public abstract interface Sub : R|test/InheritMethodsDifferentReturnTypesGeneric.Super1|, R|test/InheritMethodsDifferentReturnTypesGeneric.Super2| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.fir.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.fir.k1.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.fir.txt rename to compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.fir.k1.txt diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.fir.k2.txt new file mode 100644 index 00000000000..c9a26138c67 --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.fir.k2.txt @@ -0,0 +1,16 @@ +public open class PropertyArrayTypes : R|kotlin/Any| { + public final var arrayOfArrays: R|kotlin/Array>| + public get(): R|kotlin/Array>| + public set(value: R|kotlin/Array>|): R|kotlin/Unit| + + public final var array: R|kotlin/Array| + public get(): R|kotlin/Array| + public set(value: R|kotlin/Array|): R|kotlin/Unit| + + public final var genericArray: R|kotlin/Array| + public get(): R|kotlin/Array| + public set(value: R|kotlin/Array|): R|kotlin/Unit| + + public constructor(): R|test/PropertyArrayTypes| + +} diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.fir.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.fir.k1.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.fir.txt rename to compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.fir.k1.txt diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.fir.k2.txt new file mode 100644 index 00000000000..c08663738d1 --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.fir.k2.txt @@ -0,0 +1,11 @@ +public open class WrongFieldMutability : R|kotlin/Any| { + public final var fooNotFinal: R|kotlin/String?| + public get(): R|kotlin/String?| + public set(value: R|kotlin/String?|): R|kotlin/Unit| + + public final val fooFinal: R|kotlin/String?| + public get(): R|kotlin/String?| + + public constructor(): R|test/WrongFieldMutability| + +} diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.fir.k2.txt index 74229affefb..7f5ead64908 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.fir.k2.txt @@ -1,31 +1,31 @@ public abstract interface PropagateTypeArgumentNullable : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun invOutR(): R|kotlin/collections/MutableList>| + public abstract fun outS(p: R|kotlin/collections/List|): R|kotlin/Unit| public abstract fun invOutS(p: R|kotlin/collections/MutableList>|): R|kotlin/Unit| - public abstract fun invR(): R|kotlin/collections/MutableList| - public abstract fun outOutS(p: R|kotlin/collections/List>|): R|kotlin/Unit| public abstract fun outR(): R|kotlin/collections/List| - public abstract fun outS(p: R|kotlin/collections/List|): R|kotlin/Unit| + public abstract fun invR(): R|kotlin/collections/MutableList| + + public abstract fun invOutR(): R|kotlin/collections/MutableList>| } public abstract interface Sub : R|test/PropagateTypeArgumentNullable.Super| { - public abstract fun invOutR(): R|kotlin/collections/MutableList>| + public abstract fun outS(p: R|kotlin/collections/List|): R|kotlin/Unit| public abstract fun invOutS(p: R|kotlin/collections/MutableList>|): R|kotlin/Unit| - public abstract fun invR(): R|kotlin/collections/MutableList| - public abstract fun outOutS(p: R|kotlin/collections/List>|): R|kotlin/Unit| public abstract fun outR(): R|kotlin/collections/List| - public abstract fun outS(p: R|kotlin/collections/List|): R|kotlin/Unit| + public abstract fun invR(): R|kotlin/collections/MutableList| + + public abstract fun invOutR(): R|kotlin/collections/MutableList>| } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.fir.k2.txt index 90f519f285c..2d3d039781e 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface ChangeProjectionKind1 : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(p: R|kotlin/collections/MutableList|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/ChangeProjectionKind1.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.fir.k2.txt index 433012aa513..3ea089aad53 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface ChangeProjectionKind2 : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(p: R|kotlin/collections/MutableList|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/ChangeProjectionKind2.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.fir.k2.txt index 5c881f5165d..e70493208f5 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface DeeplySubstitutedClassParameter : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(t: R|T|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Middle : R|test/DeeplySubstitutedClassParameter.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.fir.k2.txt index 6890da3153b..80916f6c8cc 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface DeeplySubstitutedClassParameter2 : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(t: R|T|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Middle : R|test/DeeplySubstitutedClassParameter2.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.fir.k2.txt index 7e85cf270cb..fc964c0c9bd 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritMutability : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(p: R|kotlin/collections/MutableList|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritMutability.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.fir.k2.txt index 5174990a2ac..61b4ecb9921 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritNotVararg : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(p0: R|kotlin/Array?|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritNotVararg.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.fir.k2.txt index f459e9925ca..ff62e5322ad 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritNotVarargInteger : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(p0: R|kotlin/Array?|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritNotVarargInteger.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.fir.k2.txt index b191e014064..ec057d981b8 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritNotVarargNotNull : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(p: R|kotlin/Array|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritNotVarargNotNull.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.fir.k2.txt index 14547b4f975..323818ac707 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritNotVarargPrimitive : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(p0: R|kotlin/IntArray?|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritNotVarargPrimitive.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.fir.k2.txt index ac145d1578e..738fab2f14a 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritNullability : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(p0: R|kotlin/String|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritNullability.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.fir.k2.txt index a28ca38b23c..80572f4558c 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritProjectionKind : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(p: R|kotlin/collections/MutableList|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritProjectionKind.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.fir.k2.txt index 1c89887b4ea..83857aa45a0 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritReadOnliness : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(p: R|kotlin/collections/List|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritReadOnliness.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.fir.k2.txt index 5678204bb5b..ba9b234dd00 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritVararg : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(vararg p0: R|kotlin/Array|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritVararg.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.fir.k2.txt index 8b0b9027beb..19095b7058f 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritVarargInteger : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(vararg p0: R|kotlin/Array|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritVarargInteger.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.fir.k2.txt index b3a71c3b0e6..55f83e660a8 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritVarargNotNull : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(vararg p: R|kotlin/Array|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritVarargNotNull.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.fir.k2.txt index e6562b7a267..f0e0bd08a51 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritVarargPrimitive : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(vararg p0: R|kotlin/IntArray|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritVarargPrimitive.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.fir.k2.txt index 53bd434f3d8..13c15929533 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.fir.k2.txt @@ -1,16 +1,16 @@ public abstract interface Kt3302 : R|kotlin/Any| { public abstract interface BSONObject : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun put(p0: R|kotlin/String|, p1: R|kotlin/Any|): R|kotlin/Any?| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface LinkedHashMap : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun put(key: R|K|, value: R|V|): R|V?| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface BasicBSONObject : R|test/Kt3302.LinkedHashMap|, R|test/Kt3302.BSONObject| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.fir.k2.txt index 28eb68ef113..6ac2a6aa01f 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface MutableToReadOnly : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(p: R|kotlin/collections/MutableList|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/MutableToReadOnly.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.fir.k2.txt index a85460d82f7..0dbc4324c0c 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface NotNullToNullable : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(p0: R|kotlin/String|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/NotNullToNullable.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.fir.k2.txt index 3c5e9f6f747..c4bcf9096ac 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface NullableToNotNull : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(p0: R|kotlin/String?|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/NullableToNotNull.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.fir.k2.txt index 7fdbde8f066..4148e016801 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface NullableToNotNullKotlinSignature : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(p: R|kotlin/String?|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/NullableToNotNullKotlinSignature.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.fir.k2.txt index 635b196dedb..7f04a38f9a4 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface OverrideWithErasedParameter : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(p0: R|T?|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/OverrideWithErasedParameter.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.fir.k2.txt index ee54154694b..cc4f634c36d 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface ReadOnlyToMutable : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(p: R|kotlin/collections/List|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/ReadOnlyToMutable.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.fir.k2.txt index 3eac9aa0b16..bf59b482f12 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.fir.k2.txt @@ -1,16 +1,16 @@ public abstract interface SubclassFromGenericAndNot : R|kotlin/Any| { public abstract interface NonGeneric : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(p0: R|kotlin/String|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Generic : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(key: R|T|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/SubclassFromGenericAndNot.NonGeneric|, R|test/SubclassFromGenericAndNot.Generic| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.fir.k2.txt index adf9fb7ce43..e39579a8d2f 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface SubstitutedClassParameter : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(t: R|T|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/SubstitutedClassParameter.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.fir.k2.txt index ea4d777a3fc..02718d0b722 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.fir.k2.txt @@ -1,16 +1,16 @@ public abstract interface SubstitutedClassParameters : R|kotlin/Any| { public abstract interface Super1 : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(t: R|T|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Super2 : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(t: R|E|): R|kotlin/Unit| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/SubstitutedClassParameters.Super1|, R|test/SubstitutedClassParameters.Super2| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.fir.k2.txt index 9e0a64a1ce3..55c94ff3718 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface AddNotNullJavaSubtype : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/CharSequence?| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/AddNotNullJavaSubtype.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.fir.k2.txt index 27c11b8c32b..bf784ceb4a6 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface AddNotNullSameJavaType : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/CharSequence?| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/AddNotNullSameJavaType.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.fir.k2.txt index d938669dec0..c6ee65a7505 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface AddNullabilityJavaSubtype : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/CharSequence| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/AddNullabilityJavaSubtype.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.fir.k2.txt index 76948493fca..7c06ae6561c 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface AddNullabilitySameGenericType1 : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/MutableList| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/AddNullabilitySameGenericType1.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.fir.k2.txt index 84fc8caadbc..2d27cf90757 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface AddNullabilitySameGenericType2 : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/MutableList| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/AddNullabilitySameGenericType2.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.fir.k2.txt index ee76e571395..ca220297a6b 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface AddNullabilitySameJavaType : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/CharSequence| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/AddNullabilitySameJavaType.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.fir.k2.txt index c76d8abe726..e2932a34753 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface CantMakeImmutableInSubclass : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/MutableCollection| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/CantMakeImmutableInSubclass.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.fir.k2.txt index 359a5170795..1e4324d61b7 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface DeeplySubstitutedClassParameter : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|T| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Middle : R|test/DeeplySubstitutedClassParameter.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.fir.k2.txt index f43271b5993..a3853216525 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface DeeplySubstitutedClassParameter2 : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|T| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Middle : R|test/DeeplySubstitutedClassParameter2.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.fir.k2.txt index 9c23fa6fe30..108da26519e 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.fir.k2.txt @@ -3,10 +3,10 @@ public abstract interface HalfSubstitutedTypeParameters : R|kotlin/Any| { } public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/MutableList| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/HalfSubstitutedTypeParameters.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.fir.k2.txt index e7eb8902e65..271aba160fc 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritNullabilityGenericSubclassSimple : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/MutableCollection| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritNullabilityGenericSubclassSimple.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.fir.k2.txt index 2ac3896d204..7f730038ce5 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritNullabilityJavaSubtype : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/CharSequence| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritNullabilityJavaSubtype.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.fir.k2.txt index 02d00f176c8..d7ad8bcfa36 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritNullabilitySameGenericType : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/MutableList| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritNullabilitySameGenericType.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.fir.k2.txt index fc13e7f66d0..5adc6b35261 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritNullabilitySameJavaType : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/CharSequence| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritNullabilitySameJavaType.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.fir.k2.txt index 811988492d5..8b0478da121 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritProjectionKind : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/MutableCollection| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritProjectionKind.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.fir.k2.txt index ef64ef991be..a34d7c8fbe6 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritReadOnlinessOfArgument : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/List>| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritReadOnlinessOfArgument.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.fir.k2.txt index 9294e096f23..81867d3bd11 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritReadOnlinessSameClass : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/List| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritReadOnlinessSameClass.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.fir.k2.txt index 0532d3ec14b..fc4a53d50bc 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface InheritReadOnlinessSubclass : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/Collection| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/InheritReadOnlinessSubclass.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.fir.k2.txt index 56267cc30cc..70fa412d257 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface SameProjectionKind : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/MutableCollection?| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/SameProjectionKind.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.fir.k2.txt index 9d543bb2585..32dcdd28c8c 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.fir.k2.txt @@ -1,16 +1,16 @@ public abstract interface SubclassFromGenericAndNot : R|kotlin/Any| { public abstract interface NonGeneric : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/String?| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Generic : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|T| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/SubclassFromGenericAndNot.NonGeneric|, R|test/SubclassFromGenericAndNot.Generic| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.fir.k2.txt index 384d19bb694..9f14b687d92 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface SubstitutedClassParameter : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|T| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/SubstitutedClassParameter.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.fir.k2.txt index a0733b7f45f..755a95e35b6 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.fir.k2.txt @@ -1,16 +1,16 @@ public abstract interface SubstitutedClassParameters : R|kotlin/Any| { public abstract interface Super1 : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|T| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Super2 : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|E| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/SubstitutedClassParameters.Super1|, R|test/SubstitutedClassParameters.Super2| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.fir.k2.txt index 9d34aebd896..1b6846d6cf0 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.fir.k2.txt @@ -1,16 +1,16 @@ public abstract interface TwoSuperclassesConflictingProjectionKinds : R|kotlin/Any| { public abstract interface Super1 : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/MutableCollection| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Super2 : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/MutableCollection| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/TwoSuperclassesConflictingProjectionKinds.Super1|, R|test/TwoSuperclassesConflictingProjectionKinds.Super2| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.fir.k2.txt index f6a5e73bc53..bfc8ac7c40a 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.fir.k2.txt @@ -1,16 +1,16 @@ public abstract interface TwoSuperclassesInvariantAndCovariantInferMutability : R|kotlin/Any| { public abstract interface Super1 : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/List>| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Super2 : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/MutableList>| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/TwoSuperclassesInvariantAndCovariantInferMutability.Super1|, R|test/TwoSuperclassesInvariantAndCovariantInferMutability.Super2| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.fir.k2.txt index 64642cdeaf9..f7623b023fc 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.fir.k2.txt @@ -1,16 +1,16 @@ public abstract interface TwoSuperclassesInvariantAndCovariantInferNullability : R|kotlin/Any| { public abstract interface Super1 : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/List| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Super2 : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/MutableList| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/TwoSuperclassesInvariantAndCovariantInferNullability.Super1|, R|test/TwoSuperclassesInvariantAndCovariantInferNullability.Super2| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.fir.k2.txt index cdf7d1ff983..988a38e02f6 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.fir.k2.txt @@ -1,16 +1,16 @@ public abstract interface TwoSuperclassesMutableAndNot : R|kotlin/Any| { public abstract interface Super1 : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/MutableCollection| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Super2 : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/List| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/TwoSuperclassesMutableAndNot.Super1|, R|test/TwoSuperclassesMutableAndNot.Super2| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.fir.k2.txt index 6531d418218..86ac385c664 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.fir.k2.txt @@ -1,16 +1,16 @@ public abstract interface TwoSuperclassesReturnJavaSubtype : R|kotlin/Any| { public abstract interface Super1 : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/CharSequence?| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Super2 : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/CharSequence| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/TwoSuperclassesReturnJavaSubtype.Super1|, R|test/TwoSuperclassesReturnJavaSubtype.Super2| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.fir.k2.txt index a4911fc5d2f..b3ecf0828f3 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.fir.k2.txt @@ -1,16 +1,16 @@ public abstract interface TwoSuperclassesReturnSameJavaType : R|kotlin/Any| { public abstract interface Super1 : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/CharSequence?| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Super2 : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/CharSequence| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/TwoSuperclassesReturnSameJavaType.Super1|, R|test/TwoSuperclassesReturnSameJavaType.Super2| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.fir.k2.txt index 5b5aa9c8b56..9e99f2e5623 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.fir.k2.txt @@ -1,16 +1,16 @@ public abstract interface TwoSuperclassesSupplementNotNull : R|kotlin/Any| { public abstract interface Super1 : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/List| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Super2 : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|kotlin/collections/List?| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/TwoSuperclassesSupplementNotNull.Super1|, R|test/TwoSuperclassesSupplementNotNull.Super2| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.fir.k2.txt index 0c385493ef9..e651fecb460 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface TypeParamOfClass : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|T| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/TypeParamOfClass.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.fir.k2.txt index cc1020ac3c3..3bbee55bb96 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface TypeParamOfClassSubstituted : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|T| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/TypeParamOfClassSubstituted.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.fir.k2.txt index d3425e01469..865b787980b 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.fir.k2.txt @@ -1,9 +1,9 @@ public abstract interface TypeParamOfFun : R|kotlin/Any| { public abstract interface Super : R|kotlin/Any| { - public abstract fun dummy(): R|kotlin/Unit| - public abstract fun foo(): R|T| + public abstract fun dummy(): R|kotlin/Unit| + } public abstract interface Sub : R|test/TypeParamOfFun.Super| { diff --git a/compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.fir.txt b/compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.fir.k1.txt similarity index 99% rename from compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.fir.txt rename to compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.fir.k1.txt index a02c4f8099f..88f6a373b92 100644 --- a/compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.fir.txt +++ b/compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.fir.k1.txt @@ -14,4 +14,3 @@ public abstract interface Super2 : R|kotlin/Any| { private final fun foo(): R|kotlin/String| } - diff --git a/compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.fir.k2.txt new file mode 100644 index 00000000000..20172ad789b --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.fir.k2.txt @@ -0,0 +1,16 @@ +public abstract interface Sub : R|test/Super1|, R|test/Super2| { +} + +public abstract interface Super1 : R|kotlin/Any| { + public abstract fun foo(): R|kotlin/CharSequence| + + private final fun bar(): R|kotlin/String| + +} + +public abstract interface Super2 : R|kotlin/Any| { + private final fun foo(): R|kotlin/String| + + public abstract fun bar(): R|kotlin/CharSequence| + +} diff --git a/compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.fir.txt b/compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.fir.k1.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.fir.txt rename to compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.fir.k1.txt diff --git a/compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.fir.k2.txt new file mode 100644 index 00000000000..6904191bfec --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.fir.k2.txt @@ -0,0 +1,18 @@ +public abstract interface A : R|kotlin/Any| { + public open fun foo(): R|kotlin/Unit| + + public open fun bar(): R|kotlin/Unit| + +} + +public open class B : R|test/A| { + public constructor(): R|test/B| + +} + +public final class C : R|test/B| { + public open fun bar(): R|kotlin/Unit| + + public constructor(): R|test/C| + +} diff --git a/compiler/testData/loadJava/compiledKotlin/memberOrder/extensionMembers.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/memberOrder/extensionMembers.fir.k2.txt index 4285f8de669..03fec9e3cc8 100644 --- a/compiler/testData/loadJava/compiledKotlin/memberOrder/extensionMembers.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/memberOrder/extensionMembers.fir.k2.txt @@ -1,26 +1,26 @@ public final class A : R|kotlin/Any| { - public final fun f1(): R|kotlin/Unit| - public final fun R|kotlin/String|.f1(): R|kotlin/Unit| + public final fun f1(): R|kotlin/Unit| + public final fun R|kotlin/Int|.f1(): R|kotlin/Unit| - public final fun f2(): R|kotlin/Unit| - public final fun R|kotlin/String|.f2(): R|kotlin/Unit| + public final fun f2(): R|kotlin/Unit| + public final fun R|kotlin/Int|.f2(): R|kotlin/Unit| - public final fun f3(): R|kotlin/Unit| - public final fun R|kotlin/String|.f3(): R|kotlin/Unit| + public final fun f3(): R|kotlin/Unit| + public final fun R|kotlin/Int|.f3(): R|kotlin/Unit| - public final val c: R|kotlin/Int| + public final val R|kotlin/Int|.c: R|kotlin/Int| public get(): R|kotlin/Int| - public final val R|kotlin/Int|.c: R|kotlin/Int| + public final val c: R|kotlin/Int| public get(): R|kotlin/Int| public final val d: R|kotlin/Int| diff --git a/compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.fir.k2.txt deleted file mode 100644 index d11bfe3c8d0..00000000000 --- a/compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.fir.k2.txt +++ /dev/null @@ -1,19 +0,0 @@ -public final class A : R|kotlin/Any| { - public final val a: R|kotlin/Int| - public get(): R|kotlin/Int| - - public final val R|kotlin/Int|.a: R|kotlin/Int| - public get(): R|kotlin/Int| - - public final val R|kotlin/Int|.b: R|kotlin/Int| - public get(): R|kotlin/Int| - - public final val c: R|kotlin/Int| - public get(): R|kotlin/Int| - - public final val R|kotlin/Int|.c: R|kotlin/Int| - public get(): R|kotlin/Int| - - public constructor(): R|test/A| - -} diff --git a/compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.fir.k1.txt b/compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.fir.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.fir.k1.txt rename to compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.fir.txt diff --git a/compiler/testData/loadJava/compiledKotlin/nestedClasses/deepInnerGeneric.fir.txt b/compiler/testData/loadJava/compiledKotlin/nestedClasses/deepInnerGeneric.fir.k1.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlin/nestedClasses/deepInnerGeneric.fir.txt rename to compiler/testData/loadJava/compiledKotlin/nestedClasses/deepInnerGeneric.fir.k1.txt diff --git a/compiler/testData/loadJava/compiledKotlin/nestedClasses/deepInnerGeneric.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/nestedClasses/deepInnerGeneric.fir.k2.txt new file mode 100644 index 00000000000..29d017f5a12 --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/nestedClasses/deepInnerGeneric.fir.k2.txt @@ -0,0 +1,23 @@ +public final class A : R|kotlin/Any| { + public constructor(): R|test/A| + + public final inner class B : R|kotlin/Any| { + public test/A.constructor(): R|test/A.B| + + public final inner class C : R|kotlin/Any| { + public test/A.B.constructor(): R|test/A.B.C| + + public final inner class D : R|kotlin/Any| { + public final fun foo(p1: R|P1|, p2: R|P2|, p3: R|P3|, p4: R|P4|): R|kotlin/Nothing| + + public final fun bar(ta: R|TA|, tb: R|TB|, tc: R|TC|, td: R|TD|): R|test/A.B.C.D| + + public test/A.B.C.constructor(): R|test/A.B.C.D| + + } + + } + + } + +} diff --git a/compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithSet.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithSet.fir.k2.txt index 6a157da5f2d..c1350757586 100644 --- a/compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithSet.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithSet.fir.k2.txt @@ -3,14 +3,6 @@ public final class ClassVal : R|kotlin/Any| { public get(): R|kotlin/Int| public set(value: R|kotlin/Int|): R|kotlin/Unit| - public final var property10: R|kotlin/Int| - public get(): R|kotlin/Int| - protected set(value: R|kotlin/Int|): R|kotlin/Unit| - - public final var property11: R|kotlin/Int| - public get(): R|kotlin/Int| - internal set(value: R|kotlin/Int|): R|kotlin/Unit| - public final var property2: R|java/lang/Object| public get(): R|java/lang/Object| protected set(value: R|java/lang/Object|): R|kotlin/Unit| @@ -35,6 +27,14 @@ public final class ClassVal : R|kotlin/Any| { public get(): R|kotlin/Int| private set(value: R|kotlin/Int|): R|kotlin/Unit| + public final var property10: R|kotlin/Int| + public get(): R|kotlin/Int| + protected set(value: R|kotlin/Int|): R|kotlin/Unit| + + public final var property11: R|kotlin/Int| + public get(): R|kotlin/Int| + internal set(value: R|kotlin/Int|): R|kotlin/Unit| + public constructor(): R|test/ClassVal| } diff --git a/compiler/testData/loadJava/compiledKotlin/visibility/PrivateClassMembers.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/visibility/PrivateClassMembers.fir.k2.txt index 9b9a1d3dfb2..0b9f6a5be0b 100644 --- a/compiler/testData/loadJava/compiledKotlin/visibility/PrivateClassMembers.fir.k2.txt +++ b/compiler/testData/loadJava/compiledKotlin/visibility/PrivateClassMembers.fir.k2.txt @@ -1,15 +1,15 @@ public final class PrivateClassMembers : R|kotlin/Any| { private final fun f(): R|kotlin/Int| - internal final val internal: R|kotlin/Int| - internal get(): R|kotlin/Int| + private final val v: R|kotlin/Int| + private get(): R|kotlin/Int| private final var r: R|kotlin/Int| private get(): R|kotlin/Int| private set(value: R|kotlin/Int|): R|kotlin/Unit| - private final val v: R|kotlin/Int| - private get(): R|kotlin/Int| + internal final val internal: R|kotlin/Int| + internal get(): R|kotlin/Int| public constructor(): R|test/PrivateClassMembers| diff --git a/compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.fir.txt b/compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.fir.k1.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.fir.txt rename to compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.fir.k1.txt diff --git a/compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.fir.k2.txt new file mode 100644 index 00000000000..acfd25259d6 --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.fir.k2.txt @@ -0,0 +1,20 @@ +public final class A : R|kotlin/Any| { + private/*private to this*/ final fun bas(): R|I| + + private/*private to this*/ final val foo: R|I| + private/*private to this*/ get(): R|I| + + private/*private to this*/ final var bar: R|I| + private/*private to this*/ get(): R|I| + private/*private to this*/ set(value: R|I|): R|kotlin/Unit| + + private/*private to this*/ final val val_with_accessors: R|I| + private/*private to this*/ get(): R|I| + + private/*private to this*/ final var var_with_accessors: R|I| + private/*private to this*/ get(): R|I| + private/*private to this*/ set(value: R|I|): R|kotlin/Unit| + + public constructor(): R|test/A| + +} diff --git a/compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.fir.txt b/compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.fir.k1.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.fir.txt rename to compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.fir.k1.txt diff --git a/compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.fir.k2.txt new file mode 100644 index 00000000000..c283a5aac9a --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.fir.k2.txt @@ -0,0 +1,27 @@ +public open class Base : R|kotlin/Any| { + protected open val prot: R|kotlin/Int| + protected get(): R|kotlin/Int| + + internal open val int: R|kotlin/Int| + internal get(): R|kotlin/Int| + + public open val pub: R|kotlin/Int| + public get(): R|kotlin/Int| + + public constructor(): R|test/Base| + +} + +public final class Child : R|test/Base| { + protected open val prot: R|kotlin/Int| + protected get(): R|kotlin/Int| + + internal open val int: R|kotlin/Int| + internal get(): R|kotlin/Int| + + public open val pub: R|kotlin/Int| + public get(): R|kotlin/Int| + + public constructor(prot: R|kotlin/Int|, int: R|kotlin/Int|, pub: R|kotlin/Int|): R|test/Child| + +} diff --git a/compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.fir.txt b/compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.fir.k1.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.fir.txt rename to compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.fir.k1.txt diff --git a/compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.fir.k2.txt new file mode 100644 index 00000000000..0fab8e482c9 --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.fir.k2.txt @@ -0,0 +1,27 @@ +public open class Base : R|kotlin/Any| { + protected open val prot: R|kotlin/Int| + protected get(): R|kotlin/Int| + + internal open val int: R|kotlin/Int| + internal get(): R|kotlin/Int| + + public open val pub: R|kotlin/Int| + public get(): R|kotlin/Int| + + public constructor(): R|test/Base| + +} + +public final class Child : R|test/Base| { + public open val prot: R|kotlin/Int| + public get(): R|kotlin/Int| + + public open val int: R|kotlin/Int| + public get(): R|kotlin/Int| + + public open val pub: R|kotlin/Int| + public get(): R|kotlin/Int| + + public constructor(prot: R|kotlin/Int|, int: R|kotlin/Int|, pub: R|kotlin/Int|): R|test/Child| + +} diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/annotations/WithUnsignedTypeParameters.fir.txt b/compiler/testData/loadJava/compiledKotlinWithStdlib/annotations/WithUnsignedTypeParameters.fir.k1.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlinWithStdlib/annotations/WithUnsignedTypeParameters.fir.txt rename to compiler/testData/loadJava/compiledKotlinWithStdlib/annotations/WithUnsignedTypeParameters.fir.k1.txt diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/annotations/WithUnsignedTypeParameters.fir.k2.txt b/compiler/testData/loadJava/compiledKotlinWithStdlib/annotations/WithUnsignedTypeParameters.fir.k2.txt new file mode 100644 index 00000000000..80c9ae674f3 --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/annotations/WithUnsignedTypeParameters.fir.k2.txt @@ -0,0 +1,39 @@ +public final const val ubyteConst: R|kotlin/UByte| = Byte(10) + public get(): R|kotlin/UByte| + +public final const val uintConst: R|kotlin/UInt| = Int(30) + public get(): R|kotlin/UInt| + +public final const val ulongConst: R|kotlin/ULong| = Long(40) + public get(): R|kotlin/ULong| + +public final const val ushortConst: R|kotlin/UShort| = Short(20) + public get(): R|kotlin/UShort| + +public final class A : R|kotlin/Any| { + public final fun unsigned(s: R|@R|test/Ann|(ubyte = UByte(1), ushort = UShort(2), uint = UInt(3), ulong = ULong(4)) kotlin/String|): R|kotlin/Unit| + + public final fun <@R|test/Ann|(ubyte = UByte(-1), ushort = UShort(-1), uint = UInt(-1), ulong = ULong(-1)) T> typeParam(): R|kotlin/Unit| + + public final fun unsignedConsts(s: R|@R|test/Ann|(ubyte = UByte(10), ushort = UShort(20), uint = UInt(30), ulong = ULong(40)) kotlin/String|): R|kotlin/Unit| + + public constructor(): R|test/A| + +} + +@R|kotlin/annotation/Target|(allowedTargets = (R|kotlin/annotation/AnnotationTarget.TYPE|, R|kotlin/annotation/AnnotationTarget.TYPE_PARAMETER|)) public final annotation class Ann : R|kotlin/Annotation| { + public final val ubyte: R|kotlin/UByte| + public get(): R|kotlin/UByte| + + public final val ushort: R|kotlin/UShort| + public get(): R|kotlin/UShort| + + public final val uint: R|kotlin/UInt| + public get(): R|kotlin/UInt| + + public final val ulong: R|kotlin/ULong| + public get(): R|kotlin/ULong| + + public constructor(ubyte: R|kotlin/UByte|, ushort: R|kotlin/UShort|, uint: R|kotlin/UInt|, ulong: R|kotlin/ULong|): R|test/Ann| + +} diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/memberOrder/ExtensionMembers.fir.txt b/compiler/testData/loadJava/compiledKotlinWithStdlib/memberOrder/ExtensionMembers.fir.txt index 930fe2e4eb2..03fec9e3cc8 100644 --- a/compiler/testData/loadJava/compiledKotlinWithStdlib/memberOrder/ExtensionMembers.fir.txt +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/memberOrder/ExtensionMembers.fir.txt @@ -1,21 +1,24 @@ public final class A : R|kotlin/Any| { + public final fun R|kotlin/String|.f1(): R|kotlin/Unit| + public final fun f1(): R|kotlin/Unit| - public final fun f2(): R|kotlin/Unit| - - public final fun f3(): R|kotlin/Unit| - public final fun R|kotlin/Int|.f1(): R|kotlin/Unit| - public final fun R|kotlin/String|.f1(): R|kotlin/Unit| + public final fun R|kotlin/String|.f2(): R|kotlin/Unit| + + public final fun f2(): R|kotlin/Unit| public final fun R|kotlin/Int|.f2(): R|kotlin/Unit| - public final fun R|kotlin/String|.f2(): R|kotlin/Unit| + public final fun R|kotlin/String|.f3(): R|kotlin/Unit| + + public final fun f3(): R|kotlin/Unit| public final fun R|kotlin/Int|.f3(): R|kotlin/Unit| - public final fun R|kotlin/String|.f3(): R|kotlin/Unit| + public final val R|kotlin/Int|.c: R|kotlin/Int| + public get(): R|kotlin/Int| public final val c: R|kotlin/Int| public get(): R|kotlin/Int| @@ -23,13 +26,9 @@ public final class A : R|kotlin/Any| { public final val d: R|kotlin/Int| public get(): R|kotlin/Int| - public final val R|kotlin/Int|.c: R|kotlin/Int| - public get(): R|kotlin/Int| - public final val R|kotlin/Int|.d: R|kotlin/Int| public get(): R|kotlin/Int| public constructor(): R|test/A| } - diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.fir.txt b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.fir.k1.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.fir.txt rename to compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.fir.k1.txt diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.fir.k2.txt b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.fir.k2.txt new file mode 100644 index 00000000000..33eb2b70759 --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.fir.k2.txt @@ -0,0 +1,10 @@ +public abstract interface LoadIterable : R|kotlin/Any| { + public abstract fun getIterable(): R|kotlin/collections/MutableIterable?| + + public abstract fun setIterable(p0: R|kotlin/collections/MutableIterable?|): R|kotlin/Unit| + + public abstract fun getReadOnlyIterable(): R|kotlin/collections/Iterable?| + + public abstract fun setReadOnlyIterable(p0: R|kotlin/collections/Iterable?|): R|kotlin/Unit| + +} diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.fir.txt b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.fir.k1.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.fir.txt rename to compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.fir.k1.txt diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.fir.k2.txt b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.fir.k2.txt new file mode 100644 index 00000000000..38b62f232c9 --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.fir.k2.txt @@ -0,0 +1,10 @@ +public abstract interface LoadIterableWithNullability : R|kotlin/Any| { + public abstract fun getIterable(): R|kotlin/collections/MutableIterable| + + public abstract fun setIterable(p0: R|kotlin/collections/MutableIterable|): R|kotlin/Unit| + + public abstract fun getReadOnlyIterable(): R|kotlin/collections/Iterable| + + public abstract fun setReadOnlyIterable(p0: R|kotlin/collections/Iterable|): R|kotlin/Unit| + +} diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.fir.txt b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.fir.k1.txt similarity index 100% rename from compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.fir.txt rename to compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.fir.k1.txt diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.fir.k2.txt b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.fir.k2.txt new file mode 100644 index 00000000000..f7214e2ead4 --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.fir.k2.txt @@ -0,0 +1,26 @@ +public abstract interface LoadIterableWithPropagation : R|kotlin/Any| { + public abstract interface LoadIterable : R|kotlin/Any| { + public abstract fun getIterable(): R|kotlin/collections/MutableIterable?| + + public abstract fun setIterable(p0: R|kotlin/collections/MutableIterable?|): R|kotlin/Unit| + + public abstract fun getReadOnlyIterable(): R|kotlin/collections/Iterable?| + + public abstract fun setReadOnlyIterable(p0: R|kotlin/collections/Iterable?|): R|kotlin/Unit| + + } + + public open class LoadIterableImpl : R|test/LoadIterableWithPropagation.LoadIterable| { + public open fun getIterable(): R|kotlin/collections/MutableIterable?| + + public open fun setIterable(p0: R|kotlin/collections/MutableIterable?|): R|kotlin/Unit| + + public open fun getReadOnlyIterable(): R|kotlin/collections/Iterable?| + + public open fun setReadOnlyIterable(p0: R|kotlin/collections/Iterable?|): R|kotlin/Unit| + + public constructor(): R|test/LoadIterableWithPropagation.LoadIterableImpl| + + } + +} diff --git a/compiler/testData/serialization/builtinsSerializer/propertiesOrder.kt b/compiler/testData/serialization/builtinsSerializer/propertiesOrder.kt new file mode 100644 index 00000000000..1235a8fd391 --- /dev/null +++ b/compiler/testData/serialization/builtinsSerializer/propertiesOrder.kt @@ -0,0 +1,11 @@ +package test + +class Some( + val c: Int, + val b: Int, + val a: Int, +) { + val z = 1 + val y = 2 + val x = 3 +} diff --git a/compiler/testData/serialization/builtinsSerializer/propertiesOrder.txt b/compiler/testData/serialization/builtinsSerializer/propertiesOrder.txt new file mode 100644 index 00000000000..eefa8943704 --- /dev/null +++ b/compiler/testData/serialization/builtinsSerializer/propertiesOrder.txt @@ -0,0 +1,11 @@ +package test + +public final class Some { + public final val z: kotlin.Int = 1 + public final val y: kotlin.Int = 2 + public final val x: kotlin.Int = 3 + public final val c: kotlin.Int + public final val b: kotlin.Int + public final val a: kotlin.Int + public constructor Some(/*0*/ c: kotlin.Int, /*1*/ b: kotlin.Int, /*2*/ a: kotlin.Int) +} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index b554293766d..56b875e97a4 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -45880,6 +45880,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/reflection/properties/propertyOfNestedClassAndArrayType.kt"); } + @Test + @TestMetadata("propertyOrder.kt") + public void testPropertyOrder() throws Exception { + runTest("compiler/testData/codegen/box/reflection/properties/propertyOrder.kt"); + } + @Test @TestMetadata("protectedClassVar.kt") public void testProtectedClassVar() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java index ac32150a86d..0019c7afad2 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java @@ -45880,6 +45880,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/reflection/properties/propertyOfNestedClassAndArrayType.kt"); } + @Test + @TestMetadata("propertyOrder.kt") + public void testPropertyOrder() throws Exception { + runTest("compiler/testData/codegen/box/reflection/properties/propertyOrder.kt"); + } + @Test @TestMetadata("protectedClassVar.kt") public void testProtectedClassVar() throws Exception { diff --git a/native/native.tests/testData/klibContents/annotations.txt b/native/native.tests/testData/klibContents/annotations.txt index 6a641b39d87..aabac49b991 100644 --- a/native/native.tests/testData/klibContents/annotations.txt +++ b/native/native.tests/testData/klibContents/annotations.txt @@ -27,4 +27,4 @@ } @AnnoPropertyExtensionReceiver val Foo.extProp: Int @AnnoFunction fun @receiver:AnnoFunctionExtensionReceiver Foo.extfun(@AnnoFunctionParam x: Int) - fun <@AnnoFunctionTypeParameter T> f(x: B<@AnnoClassUsageTypeParameter Int>) \ No newline at end of file + fun <@AnnoFunctionTypeParameter T> f(x: B<@AnnoClassUsageTypeParameter Int>) diff --git a/native/native.tests/testData/klibContents/annotations_source_retention.txt b/native/native.tests/testData/klibContents/annotations_source_retention.txt index c95d4302837..36ace1acaed 100644 --- a/native/native.tests/testData/klibContents/annotations_source_retention.txt +++ b/native/native.tests/testData/klibContents/annotations_source_retention.txt @@ -19,4 +19,4 @@ var prop: Int } val Foo.extProp: Int - fun Foo.extfun(x: Int) \ No newline at end of file + fun Foo.extfun(x: Int) diff --git a/native/native.tests/testData/klibContents/builtinsSerializer/annotationArguments/primitiveArrays.txt b/native/native.tests/testData/klibContents/builtinsSerializer/annotationArguments/primitiveArrays.txt index 7eea622ca3d..6bbfbf25695 100644 --- a/native/native.tests/testData/klibContents/builtinsSerializer/annotationArguments/primitiveArrays.txt +++ b/native/native.tests/testData/klibContents/builtinsSerializer/annotationArguments/primitiveArrays.txt @@ -9,4 +9,4 @@ val intArray: IntArray val longArray: LongArray val shortArray: ShortArray - } \ No newline at end of file + } diff --git a/native/native.tests/testData/klibContents/builtinsSerializer/annotationArguments/primitives.txt b/native/native.tests/testData/klibContents/builtinsSerializer/annotationArguments/primitives.txt index 1552cbcedad..8498178959d 100644 --- a/native/native.tests/testData/klibContents/builtinsSerializer/annotationArguments/primitives.txt +++ b/native/native.tests/testData/klibContents/builtinsSerializer/annotationArguments/primitives.txt @@ -8,4 +8,4 @@ val int: Int val long: Long val short: Short - } \ No newline at end of file + } diff --git a/native/native.tests/testData/klibContents/builtinsSerializer/compileTimeConstants.txt b/native/native.tests/testData/klibContents/builtinsSerializer/compileTimeConstants.txt index 3fb503bb240..4d944c555d1 100644 --- a/native/native.tests/testData/klibContents/builtinsSerializer/compileTimeConstants.txt +++ b/native/native.tests/testData/klibContents/builtinsSerializer/compileTimeConstants.txt @@ -26,4 +26,4 @@ val intConst: Int = 30 val longConst: Long = 40.toLong() val shortConst: Short = 20.toShort() - val stringConst: String = "abcd" \ No newline at end of file + val stringConst: String = "abcd" diff --git a/native/native.tests/testData/klibContents/builtinsSerializer/nestedClassesAndObjects.txt b/native/native.tests/testData/klibContents/builtinsSerializer/nestedClassesAndObjects.txt index b6dacc8b108..207859b5afb 100644 --- a/native/native.tests/testData/klibContents/builtinsSerializer/nestedClassesAndObjects.txt +++ b/native/native.tests/testData/klibContents/builtinsSerializer/nestedClassesAndObjects.txt @@ -24,4 +24,4 @@ object ObjA { val memberFromObjA: Int = 300 } - } \ No newline at end of file + }