diff --git a/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestWithStdlibGenerated.java b/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestWithStdlibGenerated.java index 9198d789c27d9..4fa7f64cada91 100644 --- a/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestWithStdlibGenerated.java +++ b/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestWithStdlibGenerated.java @@ -690,6 +690,11 @@ public void testJvmOverloadsOnAnnotationClassConstructor_1_4() throws Exception runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnAnnotationClassConstructor_1_4.kt"); } + @TestMetadata("jvmOverloadsOnMangledFunctions.kt") + public void testJvmOverloadsOnMangledFunctions() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnMangledFunctions.kt"); + } + @TestMetadata("jvmOverloadsOnPrivate.kt") public void testJvmOverloadsOnPrivate() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnPrivate.kt"); diff --git a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java index fc3fc9a4d51de..80baaeb9c96f6 100644 --- a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java @@ -13862,6 +13862,11 @@ public void testJvmFieldInInlineClassCompanion() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/jvmFieldInInlineClassCompanion.kt"); } + @TestMetadata("jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt") + public void testJvmOverloadsOnTopLevelFunctionReturningInlineClassValue() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt"); + } + @TestMetadata("jvmStaticFunInInlineClassCompanion.kt") public void testJvmStaticFunInInlineClassCompanion() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/jvmStaticFunInInlineClassCompanion.kt"); diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/checkers/declarationCheckers.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/checkers/declarationCheckers.kt index 05270d1484218..2060f6f40a8a1 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/checkers/declarationCheckers.kt +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/checkers/declarationCheckers.kt @@ -44,13 +44,15 @@ import org.jetbrains.kotlin.resolve.jvm.diagnostics.ErrorsJvm import org.jetbrains.kotlin.resolve.jvm.isInlineClassThatRequiresMangling import org.jetbrains.kotlin.resolve.jvm.requiresFunctionNameManglingForParameterTypes import org.jetbrains.kotlin.resolve.jvm.requiresFunctionNameManglingForReturnType +import org.jetbrains.kotlin.resolve.jvm.shouldHideConstructorDueToInlineClassTypeValueParameters class LocalFunInlineChecker : DeclarationChecker { override fun check(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) { if (InlineUtil.isInline(descriptor) && declaration is KtNamedFunction && descriptor is FunctionDescriptor && - descriptor.visibility == DescriptorVisibilities.LOCAL) { + descriptor.visibility == DescriptorVisibilities.LOCAL + ) { context.trace.report(Errors.NOT_YET_SUPPORTED_IN_INLINE.on(declaration, "Local inline functions")) } } @@ -66,7 +68,8 @@ class JvmStaticChecker(jvmTarget: JvmTarget, languageVersionSettings: LanguageVe if (declaration is KtNamedFunction || declaration is KtProperty || declaration is KtPropertyAccessor || - declaration is KtParameter) { + declaration is KtParameter + ) { checkDeclaration(declaration, descriptor, context.trace) } } @@ -85,7 +88,8 @@ class JvmStaticChecker(jvmTarget: JvmTarget, languageVersionSettings: LanguageVe if (!insideObject || insideCompanionObjectInInterface) { if (insideCompanionObjectInInterface && supportJvmStaticInInterface && - descriptor is DeclarationDescriptorWithVisibility) { + descriptor is DeclarationDescriptorWithVisibility + ) { checkVisibility(descriptor, diagnosticHolder, declaration) if (isLessJVM18) { diagnosticHolder.report(ErrorsJvm.JVM_STATIC_IN_INTERFACE_1_6.on(declaration)) @@ -201,7 +205,7 @@ class SynchronizedAnnotationChecker : DeclarationChecker { (descriptor.hasJvmStaticAnnotation() || descriptor.propertyIfAccessor.hasJvmStaticAnnotation())) } -class OverloadsAnnotationChecker: DeclarationChecker { +class OverloadsAnnotationChecker : DeclarationChecker { override fun check(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) { descriptor.findJvmOverloadsAnnotation()?.let { annotation -> val annotationEntry = DescriptorToSourceUtils.getSourceFromAnnotation(annotation) @@ -218,26 +222,40 @@ class OverloadsAnnotationChecker: DeclarationChecker { ) { val diagnosticHolder = context.trace - if (descriptor !is CallableDescriptor) { - return - } else if ((descriptor.containingDeclaration as? ClassDescriptor)?.kind == ClassKind.INTERFACE) { - diagnosticHolder.report(ErrorsJvm.OVERLOADS_INTERFACE.on(annotationEntry)) - } else if (descriptor is FunctionDescriptor && descriptor.modality == Modality.ABSTRACT) { - diagnosticHolder.report(ErrorsJvm.OVERLOADS_ABSTRACT.on(annotationEntry)) - } else if (DescriptorUtils.isLocal(descriptor)) { - diagnosticHolder.report(ErrorsJvm.OVERLOADS_LOCAL.on(annotationEntry)) - } else if (descriptor.isAnnotationConstructor()) { - val diagnostic = - if (context.languageVersionSettings.supportsFeature(LanguageFeature.ProhibitJvmOverloadsOnConstructorsOfAnnotationClasses)) - ErrorsJvm.OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR - else - ErrorsJvm.OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING - - diagnosticHolder.report(diagnostic.on(annotationEntry)) - } else if (!descriptor.visibility.isPublicAPI && descriptor.visibility != DescriptorVisibilities.INTERNAL) { - diagnosticHolder.report(ErrorsJvm.OVERLOADS_PRIVATE.on(annotationEntry)) - } else if (descriptor.valueParameters.none { it.declaresDefaultValue() || it.isActualParameterWithCorrespondingExpectedDefault }) { - diagnosticHolder.report(ErrorsJvm.OVERLOADS_WITHOUT_DEFAULT_ARGUMENTS.on(annotationEntry)) + if (descriptor !is CallableDescriptor) return + + when { + (descriptor.containingDeclaration as? ClassDescriptor)?.kind == ClassKind.INTERFACE -> + diagnosticHolder.report(ErrorsJvm.OVERLOADS_INTERFACE.on(annotationEntry)) + + descriptor is FunctionDescriptor && descriptor.modality == Modality.ABSTRACT -> + diagnosticHolder.report(ErrorsJvm.OVERLOADS_ABSTRACT.on(annotationEntry)) + + DescriptorUtils.isLocal(descriptor) -> + diagnosticHolder.report(ErrorsJvm.OVERLOADS_LOCAL.on(annotationEntry)) + + descriptor.isAnnotationConstructor() -> { + val diagnostic = + if (context.languageVersionSettings.supportsFeature(LanguageFeature.ProhibitJvmOverloadsOnConstructorsOfAnnotationClasses)) + ErrorsJvm.OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR + else + ErrorsJvm.OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING + + diagnosticHolder.report(diagnostic.on(annotationEntry)) + } + + !descriptor.visibility.isPublicAPI && descriptor.visibility != DescriptorVisibilities.INTERNAL -> + diagnosticHolder.report(ErrorsJvm.OVERLOADS_PRIVATE.on(annotationEntry)) + + descriptor.valueParameters.none { it.declaresDefaultValue() || it.isActualParameterWithCorrespondingExpectedDefault } -> + diagnosticHolder.report(ErrorsJvm.OVERLOADS_WITHOUT_DEFAULT_ARGUMENTS.on(annotationEntry)) + + descriptor is SimpleFunctionDescriptor && + (requiresFunctionNameManglingForParameterTypes(descriptor) || requiresFunctionNameManglingForReturnType(descriptor)) -> + diagnosticHolder.report(ErrorsJvm.OVERLOADS_ANNOTATION_MANGLED_FUNCTION.on(annotationEntry)) + + descriptor is ClassConstructorDescriptor && shouldHideConstructorDueToInlineClassTypeValueParameters(descriptor) -> + diagnosticHolder.report(ErrorsJvm.OVERLOADS_ANNOTATION_HIDDEN_CONSTRUCTOR.on(annotationEntry)) } } } @@ -245,8 +263,8 @@ class OverloadsAnnotationChecker: DeclarationChecker { class TypeParameterBoundIsNotArrayChecker : DeclarationChecker { override fun check(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) { val typeParameters = (descriptor as? CallableDescriptor)?.typeParameters - ?: (descriptor as? ClassDescriptor)?.declaredTypeParameters - ?: return + ?: (descriptor as? ClassDescriptor)?.declaredTypeParameters + ?: return for (typeParameter in typeParameters) { if (typeParameter.upperBounds.any { KotlinBuiltIns.isArray(it) || KotlinBuiltIns.isPrimitiveArray(it) }) { diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/DefaultErrorMessagesJvm.java b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/DefaultErrorMessagesJvm.java index 0b82f714d2c77..e4532c94ac311 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/DefaultErrorMessagesJvm.java +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/DefaultErrorMessagesJvm.java @@ -52,8 +52,11 @@ public class DefaultErrorMessagesJvm implements DefaultErrorMessages.Extension { MAP.put(OVERLOADS_LOCAL, "'@JvmOverloads' annotation cannot be used on local declarations"); MAP.put(OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING, "'@JvmOverloads' annotation on constructors of annotation classes is deprecated"); MAP.put(OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR, "'@JvmOverloads' annotation cannot be used on constructors of annotation classes"); + MAP.put(OVERLOADS_ANNOTATION_HIDDEN_CONSTRUCTOR, "'@JvmOverloads' annotation cannot be used on constructors hidden by inline class rules"); + MAP.put(OVERLOADS_ANNOTATION_MANGLED_FUNCTION, "'@JvmOverloads' annotation cannot be used on functions mangled by inline class rules"); MAP.put(INAPPLICABLE_JVM_NAME, "'@JvmName' annotation is not applicable to this declaration"); MAP.put(ILLEGAL_JVM_NAME, "Illegal JVM name"); + MAP.put(VOLATILE_ON_VALUE, "'@Volatile' annotation cannot be used on immutable properties"); MAP.put(VOLATILE_ON_DELEGATE, "'@Volatile' annotation cannot be used on delegated properties"); MAP.put(SYNCHRONIZED_ON_ABSTRACT, "'@Synchronized' annotation cannot be used on abstract functions"); diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/ErrorsJvm.java b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/ErrorsJvm.java index b20e3d57556fa..09134f13e338f 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/ErrorsJvm.java +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/ErrorsJvm.java @@ -55,7 +55,8 @@ public interface ErrorsJvm { DiagnosticFactory0 OVERLOADS_LOCAL = DiagnosticFactory0.create(ERROR); DiagnosticFactory0 OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING = DiagnosticFactory0.create(WARNING); DiagnosticFactory0 OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR = DiagnosticFactory0.create(ERROR); - + DiagnosticFactory0 OVERLOADS_ANNOTATION_MANGLED_FUNCTION = DiagnosticFactory0.create(ERROR); + DiagnosticFactory0 OVERLOADS_ANNOTATION_HIDDEN_CONSTRUCTOR = DiagnosticFactory0.create(ERROR); DiagnosticFactory0 EXTERNAL_DECLARATION_CANNOT_BE_ABSTRACT = DiagnosticFactory0.create(ERROR, ABSTRACT_MODIFIER); DiagnosticFactory0 EXTERNAL_DECLARATION_CANNOT_HAVE_BODY = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE); diff --git a/compiler/testData/codegen/box/inlineClasses/jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt b/compiler/testData/codegen/box/inlineClasses/jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt new file mode 100644 index 0000000000000..051d5314c5734 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt @@ -0,0 +1,10 @@ +// TARGET_BACKEND: JVM +// WITH_RUNTIME + +inline class Str(val s: String) + +@JvmOverloads +fun test(so: String = "O", sk: String = "K") = Str(so + sk) + +fun box(): String = + test().s \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt b/compiler/testData/codegen/bytecodeListing/inlineClasses/jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt new file mode 100644 index 0000000000000..52d3fd8fe00a8 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt @@ -0,0 +1,6 @@ +// WITH_RUNTIME + +inline class Z(val x: Int) + +@JvmOverloads +fun testTopLevelFunction(x: Int = 0): Z = Z(x) \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.txt b/compiler/testData/codegen/bytecodeListing/inlineClasses/jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.txt new file mode 100644 index 0000000000000..9807d43a4c132 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.txt @@ -0,0 +1,25 @@ +@kotlin.Metadata +public final class JvmOverloadsOnTopLevelFunctionReturningInlineClassValueKt { + // source: 'jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt' + public synthetic static method testTopLevelFunction$default(p0: int, p1: int, p2: java.lang.Object): int + public final static @kotlin.jvm.JvmOverloads method testTopLevelFunction(): int + public final static @kotlin.jvm.JvmOverloads method testTopLevelFunction(p0: int): int +} + +@kotlin.Metadata +public final class Z { + // source: 'jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt' + private final field x: int + private synthetic method (p0: int): void + public synthetic final static method box-impl(p0: int): Z + public static method constructor-impl(p0: int): int + public method equals(p0: java.lang.Object): boolean + public static method equals-impl(p0: int, p1: java.lang.Object): boolean + public final static method equals-impl0(p0: int, p1: int): boolean + public final method getX(): int + public method hashCode(): int + public static method hashCode-impl(p0: int): int + public method toString(): java.lang.String + public static method toString-impl(p0: int): java.lang.String + public synthetic final method unbox-impl(): int +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnMangledFunctions.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnMangledFunctions.fir.kt new file mode 100644 index 0000000000000..b6b09818cabaf --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnMangledFunctions.fir.kt @@ -0,0 +1,30 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER +// !LANGUAGE: +InlineClasses + +inline class Z(val x: Int) + +@JvmOverloads +fun testTopLevelFunction1(z: Z, x: Int = 0) {} + +@JvmOverloads +fun testTopLevelFunction2(x: Int, z: Z = Z(0)) {} + +@JvmOverloads +fun testTopLevelFunction3(x: Int = 0): Z = Z(x) + +class C { + @JvmOverloads + constructor(i: Int, z: Z = Z(0)) + + @JvmOverloads + constructor(s: String, z: Z, i: Int = 0) + + @JvmOverloads + fun testMemberFunction1(z: Z, x: Int = 0) {} + + @JvmOverloads + fun testMemberFunction2(x: Int, z: Z = Z(0)) {} + + @JvmOverloads + fun testMemberFunction3(x: Int = 0): Z = Z(x) +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnMangledFunctions.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnMangledFunctions.kt new file mode 100644 index 0000000000000..0bc34e142165e --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnMangledFunctions.kt @@ -0,0 +1,30 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER +// !LANGUAGE: +InlineClasses + +inline class Z(val x: Int) + +@JvmOverloads +fun testTopLevelFunction1(z: Z, x: Int = 0) {} + +@JvmOverloads +fun testTopLevelFunction2(x: Int, z: Z = Z(0)) {} + +@JvmOverloads +fun testTopLevelFunction3(x: Int = 0): Z = Z(x) + +class C { + @JvmOverloads + constructor(i: Int, z: Z = Z(0)) + + @JvmOverloads + constructor(s: String, z: Z, i: Int = 0) + + @JvmOverloads + fun testMemberFunction1(z: Z, x: Int = 0) {} + + @JvmOverloads + fun testMemberFunction2(x: Int, z: Z = Z(0)) {} + + @JvmOverloads + fun testMemberFunction3(x: Int = 0): Z = Z(x) +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnMangledFunctions.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnMangledFunctions.txt new file mode 100644 index 0000000000000..0dd58b31d9435 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnMangledFunctions.txt @@ -0,0 +1,24 @@ +package + +@kotlin.jvm.JvmOverloads public fun testTopLevelFunction1(/*0*/ z: Z, /*1*/ x: kotlin.Int = ...): kotlin.Unit +@kotlin.jvm.JvmOverloads public fun testTopLevelFunction2(/*0*/ x: kotlin.Int, /*1*/ z: Z = ...): kotlin.Unit +@kotlin.jvm.JvmOverloads public fun testTopLevelFunction3(/*0*/ x: kotlin.Int = ...): Z + +public final class C { + @kotlin.jvm.JvmOverloads public constructor C(/*0*/ i: kotlin.Int, /*1*/ z: Z = ...) + @kotlin.jvm.JvmOverloads public constructor C(/*0*/ s: kotlin.String, /*1*/ z: Z, /*2*/ i: kotlin.Int = ...) + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + @kotlin.jvm.JvmOverloads public final fun testMemberFunction1(/*0*/ z: Z, /*1*/ x: kotlin.Int = ...): kotlin.Unit + @kotlin.jvm.JvmOverloads public final fun testMemberFunction2(/*0*/ x: kotlin.Int, /*1*/ z: Z = ...): kotlin.Unit + @kotlin.jvm.JvmOverloads public final fun testMemberFunction3(/*0*/ x: kotlin.Int = ...): Z + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public final inline class Z { + public constructor Z(/*0*/ x: kotlin.Int) + public final val x: kotlin.Int + public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String +} diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java index 002db0b93993b..3a3b01d4bd634 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java @@ -690,6 +690,11 @@ public void testJvmOverloadsOnAnnotationClassConstructor_1_4() throws Exception runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnAnnotationClassConstructor_1_4.kt"); } + @TestMetadata("jvmOverloadsOnMangledFunctions.kt") + public void testJvmOverloadsOnMangledFunctions() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnMangledFunctions.kt"); + } + @TestMetadata("jvmOverloadsOnPrivate.kt") public void testJvmOverloadsOnPrivate() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnPrivate.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java index 989dc6577261b..da03bc7b198ba 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java @@ -690,6 +690,11 @@ public void testJvmOverloadsOnAnnotationClassConstructor_1_4() throws Exception runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnAnnotationClassConstructor_1_4.kt"); } + @TestMetadata("jvmOverloadsOnMangledFunctions.kt") + public void testJvmOverloadsOnMangledFunctions() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnMangledFunctions.kt"); + } + @TestMetadata("jvmOverloadsOnPrivate.kt") public void testJvmOverloadsOnPrivate() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnPrivate.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index 2507d84c0ab75..d1b4149391682 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -15262,6 +15262,11 @@ public void testJvmFieldInInlineClassCompanion() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/jvmFieldInInlineClassCompanion.kt"); } + @TestMetadata("jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt") + public void testJvmOverloadsOnTopLevelFunctionReturningInlineClassValue() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt"); + } + @TestMetadata("jvmStaticFunInInlineClassCompanion.kt") public void testJvmStaticFunInInlineClassCompanion() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/jvmStaticFunInInlineClassCompanion.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java index d5de0775cb2d7..5b6cc7ce033d9 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java @@ -982,6 +982,11 @@ public void testInlineClassWithManyKindsOfMembers() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassWithManyKindsOfMembers.kt"); } + @TestMetadata("jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt") + public void testJvmOverloadsOnTopLevelFunctionReturningInlineClassValue() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt"); + } + @TestMetadata("memberExtensionProperty.kt") public void testMemberExtensionProperty() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/memberExtensionProperty.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 1b0a7860b6aeb..1b2791231c135 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -15272,6 +15272,11 @@ public void testJvmFieldInInlineClassCompanion() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/jvmFieldInInlineClassCompanion.kt"); } + @TestMetadata("jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt") + public void testJvmOverloadsOnTopLevelFunctionReturningInlineClassValue() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt"); + } + @TestMetadata("jvmStaticFunInInlineClassCompanion.kt") public void testJvmStaticFunInInlineClassCompanion() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/jvmStaticFunInInlineClassCompanion.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 9e5864a4ad41a..3f5e335323b34 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -13862,6 +13862,11 @@ public void testJvmFieldInInlineClassCompanion() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/jvmFieldInInlineClassCompanion.kt"); } + @TestMetadata("jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt") + public void testJvmOverloadsOnTopLevelFunctionReturningInlineClassValue() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt"); + } + @TestMetadata("jvmStaticFunInInlineClassCompanion.kt") public void testJvmStaticFunInInlineClassCompanion() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/jvmStaticFunInInlineClassCompanion.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java index 2a5f6d59abb73..5cdf9872f3079 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java @@ -952,6 +952,11 @@ public void testInlineClassWithManyKindsOfMembers() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassWithManyKindsOfMembers.kt"); } + @TestMetadata("jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt") + public void testJvmOverloadsOnTopLevelFunctionReturningInlineClassValue() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/jvmOverloadsOnTopLevelFunctionReturningInlineClassValue.kt"); + } + @TestMetadata("memberExtensionProperty.kt") public void testMemberExtensionProperty() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/memberExtensionProperty.kt");