From 3e820ff3b16ca0510b30d5beca4f0ae1818a5ad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven=20Sch=C3=A4fer?= Date: Fri, 22 Jan 2021 16:57:55 +0100 Subject: [PATCH] JVM: Take inline class mangling state into account for default methods --- .../kotlin/codegen/state/KotlinTypeMapper.kt | 18 ++++++- ...mpileKotlinAgainstKotlinTestGenerated.java | 50 +++++++++++++++++++ ...llDeserializedPropertyOnInlineClassType.kt | 1 + ...zedPropertyOnInlineClassTypeOldMangling.kt | 21 ++++++++ ...rametersInBinaryDependenciesOldMangling.kt | 14 ++++++ ...tWithInlineClassAndReceiversOldMangling.kt | 16 ++++++ ...ineClassFakeOverrideManglingOldMangling.kt | 23 +++++++++ ...eClassFromBinaryDependenciesOldMangling.kt | 40 +++++++++++++++ .../inlineClassInlineFunctionCall.kt | 1 + ...nlineClassInlineFunctionCallOldMangling.kt | 14 ++++++ .../inlineClassInlinePropertyOldMangling.kt | 17 +++++++ ...vateCompanionObjectValInDifferentModule.kt | 1 + ...onObjectValInDifferentModuleOldMangling.kt | 24 +++++++++ .../privateTopLevelValInDifferentModule.kt | 1 + ...TopLevelValInDifferentModuleOldMangling.kt | 21 ++++++++ .../suspendFunWithDefaultMangling.kt | 1 + .../suspendFunWithDefaultOldMangling.kt | 32 ++++++++++++ ...mpileKotlinAgainstKotlinTestGenerated.java | 50 +++++++++++++++++++ ...mpileKotlinAgainstKotlinTestGenerated.java | 50 +++++++++++++++++++ .../ir/JvmIrAgainstOldBoxTestGenerated.java | 50 +++++++++++++++++++ .../ir/JvmOldAgainstIrBoxTestGenerated.java | 50 +++++++++++++++++++ 21 files changed, 493 insertions(+), 2 deletions(-) create mode 100644 compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt create mode 100644 compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt create mode 100644 compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt create mode 100644 compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt create mode 100644 compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt create mode 100644 compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt create mode 100644 compiler/testData/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt create mode 100644 compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt create mode 100644 compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt create mode 100644 compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.kt index 6fa8f12fb98..7c2ab8f0614 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.kt @@ -375,13 +375,27 @@ class KotlinTypeMapper @JvmOverloads constructor( kind: OwnerKind? = null, resolvedCall: ResolvedCall<*>? = null ): CallableMethod { + fun mapDefaultCallback(descriptor: FunctionDescriptor, kind: OwnerKind): () -> Method { + if (useOldManglingRulesForFunctionAcceptingInlineClass && !useOldInlineClassesManglingScheme) { + return { + val prevManglingState = useOldManglingRulesForFunctionAcceptingInlineClass + useOldManglingRulesForFunctionAcceptingInlineClass = true + mapDefaultMethod(descriptor, kind).also { + useOldManglingRulesForFunctionAcceptingInlineClass = prevManglingState + } + } + } else { + return { mapDefaultMethod(descriptor, kind) } + } + } + // we generate constructors of inline classes as usual functions if (descriptor is ConstructorDescriptor && kind != OwnerKind.ERASED_INLINE_CLASS) { val method = mapSignatureSkipGeneric(descriptor.original) val owner = mapOwner(descriptor) val originalDescriptor = descriptor.original return CallableMethod( - owner, owner, { mapDefaultMethod(originalDescriptor, OwnerKind.IMPLEMENTATION) }, method, INVOKESPECIAL, + owner, owner, mapDefaultCallback(originalDescriptor, OwnerKind.IMPLEMENTATION), method, INVOKESPECIAL, null, null, null, null, null, originalDescriptor.returnType, isInterfaceMethod = false, isDefaultMethodInInterface = false, boxInlineClassBeforeInvoke = false ) @@ -557,7 +571,7 @@ class KotlinTypeMapper @JvmOverloads constructor( return CallableMethod( owner, ownerForDefaultImpl, - { mapDefaultMethod(baseMethodDescriptor, getKindForDefaultImplCall(baseMethodDescriptor)) }, + mapDefaultCallback(baseMethodDescriptor, getKindForDefaultImplCall(baseMethodDescriptor)), signature, invokeOpcode, thisClass, dispatchReceiverKotlinType, receiverParameterType, extensionReceiverKotlinType, calleeType, returnKotlinType, if (jvmTarget >= JvmTarget.JVM_1_8) isInterfaceMember else invokeOpcode == INVOKEINTERFACE, diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/FirCompileKotlinAgainstKotlinTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/FirCompileKotlinAgainstKotlinTestGenerated.java index 96f03a929c6..988a42c505a 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/FirCompileKotlinAgainstKotlinTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/FirCompileKotlinAgainstKotlinTestGenerated.java @@ -50,6 +50,11 @@ public class FirCompileKotlinAgainstKotlinTestGenerated extends AbstractFirCompi runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt"); } + @TestMetadata("callDeserializedPropertyOnInlineClassTypeOldMangling.kt") + public void testCallDeserializedPropertyOnInlineClassTypeOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt"); + } + @TestMetadata("callsToMultifileClassFromOtherPackage.kt") public void testCallsToMultifileClassFromOtherPackage() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt"); @@ -90,6 +95,11 @@ public class FirCompileKotlinAgainstKotlinTestGenerated extends AbstractFirCompi runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt"); } + @TestMetadata("constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt") + public void testConstructorWithInlineClassParametersInBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt"); + } + @TestMetadata("copySamOnInline.kt") public void testCopySamOnInline() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt"); @@ -125,6 +135,11 @@ public class FirCompileKotlinAgainstKotlinTestGenerated extends AbstractFirCompi runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt"); } + @TestMetadata("defaultWithInlineClassAndReceiversOldMangling.kt") + public void testDefaultWithInlineClassAndReceiversOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt"); + } + @TestMetadata("delegatedDefault.kt") public void testDelegatedDefault() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/delegatedDefault.kt"); @@ -165,21 +180,41 @@ public class FirCompileKotlinAgainstKotlinTestGenerated extends AbstractFirCompi runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt"); } + @TestMetadata("inlineClassFakeOverrideManglingOldMangling.kt") + public void testInlineClassFakeOverrideManglingOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt"); + } + @TestMetadata("inlineClassFromBinaryDependencies.kt") public void testInlineClassFromBinaryDependencies() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt"); } + @TestMetadata("inlineClassFromBinaryDependenciesOldMangling.kt") + public void testInlineClassFromBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt"); + } + @TestMetadata("inlineClassInlineFunctionCall.kt") public void testInlineClassInlineFunctionCall() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt"); } + @TestMetadata("inlineClassInlineFunctionCallOldMangling.kt") + public void testInlineClassInlineFunctionCallOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt"); + } + @TestMetadata("inlineClassInlineProperty.kt") public void testInlineClassInlineProperty() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt"); } + @TestMetadata("inlineClassInlinePropertyOldMangling.kt") + public void testInlineClassInlinePropertyOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt"); + } + @TestMetadata("inlineClassesOldMangling.kt") public void testInlineClassesOldMangling() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt"); @@ -355,11 +390,21 @@ public class FirCompileKotlinAgainstKotlinTestGenerated extends AbstractFirCompi runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt"); } + @TestMetadata("privateCompanionObjectValInDifferentModuleOldMangling.kt") + public void testPrivateCompanionObjectValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt"); + } + @TestMetadata("privateTopLevelValInDifferentModule.kt") public void testPrivateTopLevelValInDifferentModule() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt"); } + @TestMetadata("privateTopLevelValInDifferentModuleOldMangling.kt") + public void testPrivateTopLevelValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt"); + } + @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/propertyReference.kt"); @@ -410,6 +455,11 @@ public class FirCompileKotlinAgainstKotlinTestGenerated extends AbstractFirCompi runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); } + @TestMetadata("suspendFunWithDefaultOldMangling.kt") + public void testSuspendFunWithDefaultOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt"); + } + @TestMetadata("targetedJvmName.kt") public void testTargetedJvmName() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt"); diff --git a/compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt b/compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt index b3978712ea0..5006d26bcf9 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt @@ -1,3 +1,4 @@ +// !LANGUAGE: +InlineClasses // FILE: A.kt package a diff --git a/compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt b/compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt new file mode 100644 index 00000000000..6dd95b4460f --- /dev/null +++ b/compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt @@ -0,0 +1,21 @@ +// TARGET_BACKEND: JVM +// !LANGUAGE: +InlineClasses +// FILE: A.kt +// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME + +package a + +@Suppress("UNSUPPORTED_FEATURE") +inline class Foo(val x: IntArray) { + val size: Int get() = x.size +} + +// FILE: B.kt + +import a.* + +fun box(): String { + val a = Foo(intArrayOf(3, 4)) + if (a.size != 2) return "Fail" + return "OK" +} diff --git a/compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt b/compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt new file mode 100644 index 00000000000..8febf6b7379 --- /dev/null +++ b/compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt @@ -0,0 +1,14 @@ +// TARGET_BACKEND: JVM +// !LANGUAGE: +InlineClasses +// FILE: A.kt +// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME +package lib + +inline class S(val string: String) + +class Test(val s: S) + +// FILE: B.kt +import lib.* + +fun box() = Test(S("OK")).s.string \ No newline at end of file diff --git a/compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt b/compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt new file mode 100644 index 00000000000..268760734a8 --- /dev/null +++ b/compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt @@ -0,0 +1,16 @@ +// TARGET_BACKEND: JVM +// !LANGUAGE: +InlineClasses +// FILE: A.kt +// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME +package z + +inline class Z(val s: String) + +class X { + fun Int.foo(z: Z, value: String = "OK") = value +} + +// FILE: B.kt +import z.* + +fun box(): String = with(X()) { 1.foo(Z("")) } diff --git a/compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt b/compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt new file mode 100644 index 00000000000..62905de982b --- /dev/null +++ b/compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt @@ -0,0 +1,23 @@ +// TARGET_BACKEND: JVM +// !LANGUAGE: +InlineClasses +// FILE: 1.kt +// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME + +inline class IC(val s: String) + +abstract class A { + fun foo(s: String) = IC(s) +} + +open class C : A() + +class D: C() + +// FILE: 2.kt + +fun box(): String { + var res = C().foo("OK").s + if (res != "OK") return "FAIL 1 $res" + res = D().foo("OK").s + return res +} diff --git a/compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt b/compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt new file mode 100644 index 00000000000..3219146bd33 --- /dev/null +++ b/compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt @@ -0,0 +1,40 @@ +// TARGET_BACKEND: JVM +// !LANGUAGE: +InlineClasses +// FILE: A.kt +// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME +package z + +interface IFoo { + fun foo(): String +} + +inline class Z(val s: String) : IFoo { + constructor(i: Int) : this(i.toString()) + + override fun foo(): String = s + + fun bar() = s + + inline fun run(lambda: (String) -> T) = lambda(s) + + companion object { + fun z(i: Int) = Z(i) + } +} + +// FILE: B.kt +import z.* + +fun test(z: Z) { + if (z.foo() != "1234") throw AssertionError() + if (z.bar() != "1234") throw AssertionError() + if (z.run { it } != "1234") throw AssertionError() + if (listOf(z)[0].s != "1234") throw AssertionError() +} + +fun box(): String { + test(Z("1234")) + test(Z(1234)) + test(Z.z(1234)) + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt b/compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt index d3e0401dfb0..574a2e10e8e 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt @@ -1,3 +1,4 @@ +// !LANGUAGE: +InlineClasses // FILE: A.kt inline class A(val x: String) { diff --git a/compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt b/compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt new file mode 100644 index 00000000000..7c91cf4f455 --- /dev/null +++ b/compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt @@ -0,0 +1,14 @@ +// TARGET_BACKEND: JVM +// !LANGUAGE: +InlineClasses +// FILE: A.kt +// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME + +inline class A(val x: String) { + inline fun f(other: A): A = other +} + +// FILE: B.kt + +fun box(): String { + return A("Fail").f(A("OK")).x +} diff --git a/compiler/testData/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt b/compiler/testData/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt new file mode 100644 index 00000000000..83e528e9ae1 --- /dev/null +++ b/compiler/testData/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt @@ -0,0 +1,17 @@ +// TARGET_BACKEND: JVM +// !LANGUAGE: +InlineClasses +// FILE: A.kt +// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME + +package a + +inline class S(val value: String) { + inline val k: String + get() = value + "K" +} + +// FILE: B.kt + +fun box(): String { + return a.S("O").k +} diff --git a/compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt b/compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt index 2af4f51aa26..605479aee50 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt @@ -1,3 +1,4 @@ +// !LANGUAGE: +InlineClasses // IGNORE_BACKEND: JS_IR, JS, NATIVE // WITH_REFLECT diff --git a/compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt b/compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt new file mode 100644 index 00000000000..221f80cde62 --- /dev/null +++ b/compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt @@ -0,0 +1,24 @@ +// TARGET_BACKEND: JVM +// !LANGUAGE: +InlineClasses +// IGNORE_BACKEND: JS_IR, JS, NATIVE +// WITH_REFLECT + +// FILE: A.kt +// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME +package a + +import kotlin.reflect.jvm.isAccessible + +inline class S(val s: String) + +class Host { + companion object { + private val ok = S("OK") + val ref = ::ok.apply { isAccessible = true } + } +} + +// FILE: B.kt +import a.* + +fun box() = Host.ref.call().s diff --git a/compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt b/compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt index 5a94a29901e..3b2fdc6c24d 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt @@ -1,3 +1,4 @@ +// !LANGUAGE: +InlineClasses // IGNORE_BACKEND: JS_IR, JS, NATIVE // WITH_REFLECT diff --git a/compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt b/compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt new file mode 100644 index 00000000000..0479520d631 --- /dev/null +++ b/compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt @@ -0,0 +1,21 @@ +// TARGET_BACKEND: JVM +// !LANGUAGE: +InlineClasses +// IGNORE_BACKEND: JS_IR, JS, NATIVE +// WITH_REFLECT + +// FILE: A.kt +// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME +package a + +import kotlin.reflect.jvm.isAccessible + +inline class S(val s: String) + +private val ok = S("OK") + +val ref = ::ok.apply { isAccessible = true } + +// FILE: B.kt +import a.* + +fun box() = ref.call().s \ No newline at end of file diff --git a/compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt b/compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt index 234a30603b5..7906f56bf27 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt @@ -1,3 +1,4 @@ +// !LANGUAGE: +InlineClasses // WITH_COROUTINES // FILE: a.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt b/compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt new file mode 100644 index 00000000000..03d1e7e49b9 --- /dev/null +++ b/compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt @@ -0,0 +1,32 @@ +// TARGET_BACKEND: JVM +// !LANGUAGE: +InlineClasses +// WITH_COROUTINES +// FILE: a.kt +// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME + +package a + +var result = "" + +inline class P(val value: String) + +suspend fun foo(p: P = P("OK")) { + result = p.value +} + +// FILE: b.kt + +import kotlin.coroutines.* +import helpers.* +import a.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +fun box(): String { + builder { + foo() + } + return result +} diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java index e940b1e4e08..3bec557cb3f 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java @@ -49,6 +49,11 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt"); } + @TestMetadata("callDeserializedPropertyOnInlineClassTypeOldMangling.kt") + public void testCallDeserializedPropertyOnInlineClassTypeOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt"); + } + @TestMetadata("callsToMultifileClassFromOtherPackage.kt") public void testCallsToMultifileClassFromOtherPackage() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt"); @@ -89,6 +94,11 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt"); } + @TestMetadata("constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt") + public void testConstructorWithInlineClassParametersInBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt"); + } + @TestMetadata("copySamOnInline.kt") public void testCopySamOnInline() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt"); @@ -124,6 +134,11 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt"); } + @TestMetadata("defaultWithInlineClassAndReceiversOldMangling.kt") + public void testDefaultWithInlineClassAndReceiversOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt"); + } + @TestMetadata("delegatedDefault.kt") public void testDelegatedDefault() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/delegatedDefault.kt"); @@ -164,21 +179,41 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt"); } + @TestMetadata("inlineClassFakeOverrideManglingOldMangling.kt") + public void testInlineClassFakeOverrideManglingOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt"); + } + @TestMetadata("inlineClassFromBinaryDependencies.kt") public void testInlineClassFromBinaryDependencies() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt"); } + @TestMetadata("inlineClassFromBinaryDependenciesOldMangling.kt") + public void testInlineClassFromBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt"); + } + @TestMetadata("inlineClassInlineFunctionCall.kt") public void testInlineClassInlineFunctionCall() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt"); } + @TestMetadata("inlineClassInlineFunctionCallOldMangling.kt") + public void testInlineClassInlineFunctionCallOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt"); + } + @TestMetadata("inlineClassInlineProperty.kt") public void testInlineClassInlineProperty() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt"); } + @TestMetadata("inlineClassInlinePropertyOldMangling.kt") + public void testInlineClassInlinePropertyOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt"); + } + @TestMetadata("inlineClassesOldMangling.kt") public void testInlineClassesOldMangling() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt"); @@ -354,11 +389,21 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt"); } + @TestMetadata("privateCompanionObjectValInDifferentModuleOldMangling.kt") + public void testPrivateCompanionObjectValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt"); + } + @TestMetadata("privateTopLevelValInDifferentModule.kt") public void testPrivateTopLevelValInDifferentModule() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt"); } + @TestMetadata("privateTopLevelValInDifferentModuleOldMangling.kt") + public void testPrivateTopLevelValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt"); + } + @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/propertyReference.kt"); @@ -409,6 +454,11 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); } + @TestMetadata("suspendFunWithDefaultOldMangling.kt") + public void testSuspendFunWithDefaultOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt"); + } + @TestMetadata("targetedJvmName.kt") public void testTargetedJvmName() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt"); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstKotlinTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstKotlinTestGenerated.java index b5eb98e6ded..17a233ad471 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstKotlinTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstKotlinTestGenerated.java @@ -50,6 +50,11 @@ public class IrCompileKotlinAgainstKotlinTestGenerated extends AbstractIrCompile runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt"); } + @TestMetadata("callDeserializedPropertyOnInlineClassTypeOldMangling.kt") + public void testCallDeserializedPropertyOnInlineClassTypeOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt"); + } + @TestMetadata("callsToMultifileClassFromOtherPackage.kt") public void testCallsToMultifileClassFromOtherPackage() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt"); @@ -90,6 +95,11 @@ public class IrCompileKotlinAgainstKotlinTestGenerated extends AbstractIrCompile runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt"); } + @TestMetadata("constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt") + public void testConstructorWithInlineClassParametersInBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt"); + } + @TestMetadata("copySamOnInline.kt") public void testCopySamOnInline() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt"); @@ -125,6 +135,11 @@ public class IrCompileKotlinAgainstKotlinTestGenerated extends AbstractIrCompile runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt"); } + @TestMetadata("defaultWithInlineClassAndReceiversOldMangling.kt") + public void testDefaultWithInlineClassAndReceiversOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt"); + } + @TestMetadata("delegatedDefault.kt") public void testDelegatedDefault() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/delegatedDefault.kt"); @@ -165,21 +180,41 @@ public class IrCompileKotlinAgainstKotlinTestGenerated extends AbstractIrCompile runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt"); } + @TestMetadata("inlineClassFakeOverrideManglingOldMangling.kt") + public void testInlineClassFakeOverrideManglingOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt"); + } + @TestMetadata("inlineClassFromBinaryDependencies.kt") public void testInlineClassFromBinaryDependencies() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt"); } + @TestMetadata("inlineClassFromBinaryDependenciesOldMangling.kt") + public void testInlineClassFromBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt"); + } + @TestMetadata("inlineClassInlineFunctionCall.kt") public void testInlineClassInlineFunctionCall() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt"); } + @TestMetadata("inlineClassInlineFunctionCallOldMangling.kt") + public void testInlineClassInlineFunctionCallOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt"); + } + @TestMetadata("inlineClassInlineProperty.kt") public void testInlineClassInlineProperty() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt"); } + @TestMetadata("inlineClassInlinePropertyOldMangling.kt") + public void testInlineClassInlinePropertyOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt"); + } + @TestMetadata("inlineClassesOldMangling.kt") public void testInlineClassesOldMangling() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt"); @@ -355,11 +390,21 @@ public class IrCompileKotlinAgainstKotlinTestGenerated extends AbstractIrCompile runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt"); } + @TestMetadata("privateCompanionObjectValInDifferentModuleOldMangling.kt") + public void testPrivateCompanionObjectValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt"); + } + @TestMetadata("privateTopLevelValInDifferentModule.kt") public void testPrivateTopLevelValInDifferentModule() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt"); } + @TestMetadata("privateTopLevelValInDifferentModuleOldMangling.kt") + public void testPrivateTopLevelValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt"); + } + @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/propertyReference.kt"); @@ -410,6 +455,11 @@ public class IrCompileKotlinAgainstKotlinTestGenerated extends AbstractIrCompile runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); } + @TestMetadata("suspendFunWithDefaultOldMangling.kt") + public void testSuspendFunWithDefaultOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt"); + } + @TestMetadata("targetedJvmName.kt") public void testTargetedJvmName() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt"); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxTestGenerated.java index 8c271d82a35..6ca89dbf251 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxTestGenerated.java @@ -50,6 +50,11 @@ public class JvmIrAgainstOldBoxTestGenerated extends AbstractJvmIrAgainstOldBoxT runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt"); } + @TestMetadata("callDeserializedPropertyOnInlineClassTypeOldMangling.kt") + public void testCallDeserializedPropertyOnInlineClassTypeOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt"); + } + @TestMetadata("callsToMultifileClassFromOtherPackage.kt") public void testCallsToMultifileClassFromOtherPackage() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt"); @@ -90,6 +95,11 @@ public class JvmIrAgainstOldBoxTestGenerated extends AbstractJvmIrAgainstOldBoxT runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt"); } + @TestMetadata("constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt") + public void testConstructorWithInlineClassParametersInBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt"); + } + @TestMetadata("copySamOnInline.kt") public void testCopySamOnInline() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt"); @@ -125,6 +135,11 @@ public class JvmIrAgainstOldBoxTestGenerated extends AbstractJvmIrAgainstOldBoxT runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt"); } + @TestMetadata("defaultWithInlineClassAndReceiversOldMangling.kt") + public void testDefaultWithInlineClassAndReceiversOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt"); + } + @TestMetadata("delegatedDefault.kt") public void testDelegatedDefault() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/delegatedDefault.kt"); @@ -165,21 +180,41 @@ public class JvmIrAgainstOldBoxTestGenerated extends AbstractJvmIrAgainstOldBoxT runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt"); } + @TestMetadata("inlineClassFakeOverrideManglingOldMangling.kt") + public void testInlineClassFakeOverrideManglingOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt"); + } + @TestMetadata("inlineClassFromBinaryDependencies.kt") public void testInlineClassFromBinaryDependencies() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt"); } + @TestMetadata("inlineClassFromBinaryDependenciesOldMangling.kt") + public void testInlineClassFromBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt"); + } + @TestMetadata("inlineClassInlineFunctionCall.kt") public void testInlineClassInlineFunctionCall() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt"); } + @TestMetadata("inlineClassInlineFunctionCallOldMangling.kt") + public void testInlineClassInlineFunctionCallOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt"); + } + @TestMetadata("inlineClassInlineProperty.kt") public void testInlineClassInlineProperty() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt"); } + @TestMetadata("inlineClassInlinePropertyOldMangling.kt") + public void testInlineClassInlinePropertyOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt"); + } + @TestMetadata("inlineClassesOldMangling.kt") public void testInlineClassesOldMangling() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt"); @@ -355,11 +390,21 @@ public class JvmIrAgainstOldBoxTestGenerated extends AbstractJvmIrAgainstOldBoxT runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt"); } + @TestMetadata("privateCompanionObjectValInDifferentModuleOldMangling.kt") + public void testPrivateCompanionObjectValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt"); + } + @TestMetadata("privateTopLevelValInDifferentModule.kt") public void testPrivateTopLevelValInDifferentModule() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt"); } + @TestMetadata("privateTopLevelValInDifferentModuleOldMangling.kt") + public void testPrivateTopLevelValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt"); + } + @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/propertyReference.kt"); @@ -410,6 +455,11 @@ public class JvmIrAgainstOldBoxTestGenerated extends AbstractJvmIrAgainstOldBoxT runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); } + @TestMetadata("suspendFunWithDefaultOldMangling.kt") + public void testSuspendFunWithDefaultOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt"); + } + @TestMetadata("targetedJvmName.kt") public void testTargetedJvmName() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt"); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxTestGenerated.java index 372a0b84881..301c57aee00 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxTestGenerated.java @@ -50,6 +50,11 @@ public class JvmOldAgainstIrBoxTestGenerated extends AbstractJvmOldAgainstIrBoxT runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt"); } + @TestMetadata("callDeserializedPropertyOnInlineClassTypeOldMangling.kt") + public void testCallDeserializedPropertyOnInlineClassTypeOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt"); + } + @TestMetadata("callsToMultifileClassFromOtherPackage.kt") public void testCallsToMultifileClassFromOtherPackage() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt"); @@ -90,6 +95,11 @@ public class JvmOldAgainstIrBoxTestGenerated extends AbstractJvmOldAgainstIrBoxT runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt"); } + @TestMetadata("constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt") + public void testConstructorWithInlineClassParametersInBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt"); + } + @TestMetadata("copySamOnInline.kt") public void testCopySamOnInline() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt"); @@ -125,6 +135,11 @@ public class JvmOldAgainstIrBoxTestGenerated extends AbstractJvmOldAgainstIrBoxT runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt"); } + @TestMetadata("defaultWithInlineClassAndReceiversOldMangling.kt") + public void testDefaultWithInlineClassAndReceiversOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt"); + } + @TestMetadata("delegatedDefault.kt") public void testDelegatedDefault() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/delegatedDefault.kt"); @@ -165,21 +180,41 @@ public class JvmOldAgainstIrBoxTestGenerated extends AbstractJvmOldAgainstIrBoxT runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt"); } + @TestMetadata("inlineClassFakeOverrideManglingOldMangling.kt") + public void testInlineClassFakeOverrideManglingOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt"); + } + @TestMetadata("inlineClassFromBinaryDependencies.kt") public void testInlineClassFromBinaryDependencies() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt"); } + @TestMetadata("inlineClassFromBinaryDependenciesOldMangling.kt") + public void testInlineClassFromBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt"); + } + @TestMetadata("inlineClassInlineFunctionCall.kt") public void testInlineClassInlineFunctionCall() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt"); } + @TestMetadata("inlineClassInlineFunctionCallOldMangling.kt") + public void testInlineClassInlineFunctionCallOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt"); + } + @TestMetadata("inlineClassInlineProperty.kt") public void testInlineClassInlineProperty() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt"); } + @TestMetadata("inlineClassInlinePropertyOldMangling.kt") + public void testInlineClassInlinePropertyOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt"); + } + @TestMetadata("inlineClassesOldMangling.kt") public void testInlineClassesOldMangling() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt"); @@ -355,11 +390,21 @@ public class JvmOldAgainstIrBoxTestGenerated extends AbstractJvmOldAgainstIrBoxT runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt"); } + @TestMetadata("privateCompanionObjectValInDifferentModuleOldMangling.kt") + public void testPrivateCompanionObjectValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt"); + } + @TestMetadata("privateTopLevelValInDifferentModule.kt") public void testPrivateTopLevelValInDifferentModule() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt"); } + @TestMetadata("privateTopLevelValInDifferentModuleOldMangling.kt") + public void testPrivateTopLevelValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt"); + } + @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/propertyReference.kt"); @@ -410,6 +455,11 @@ public class JvmOldAgainstIrBoxTestGenerated extends AbstractJvmOldAgainstIrBoxT runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); } + @TestMetadata("suspendFunWithDefaultOldMangling.kt") + public void testSuspendFunWithDefaultOldMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt"); + } + @TestMetadata("targetedJvmName.kt") public void testTargetedJvmName() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt");