From e4f1c10bc17e0a29375508c88d77499b3651fce5 Mon Sep 17 00:00:00 2001 From: "vladislav.grechko" Date: Sat, 17 Jun 2023 14:44:12 +0200 Subject: [PATCH] [JVM_IR] Do not compile-time evaluate `apiVersionIsAtLeast` in stdlib Function `apiVersionIsAtLeast` was introduced to be able to have different inline function content inlined to user code call sites depending on their api version settings. Thus, it should not be compile-time evaluated when being called in the body of inline stdlib function. ^KT-59452: Fixed --- .../kotlin/codegen/inline/InlineCodegen.kt | 11 +-------- .../kotlin/codegen/inline/PsiInlineCodegen.kt | 9 +++++++ ...degenWithBytecodeInlinerTestGenerated.java | 6 +++++ ...lineCodegenWithIrInlinerTestGenerated.java | 6 +++++ ...otlinAgainstInlineKotlinTestGenerated.java | 6 +++++ ...degenWithBytecodeInlinerTestGenerated.java | 6 +++++ ...lineCodegenWithIrInlinerTestGenerated.java | 6 +++++ ...otlinAgainstInlineKotlinTestGenerated.java | 6 +++++ .../backend/jvm/codegen/IrInlineCodegen.kt | 11 +++++---- ...ApiVersionAtLeastInStdlibInlineFunction.kt | 24 +++++++++++++++++++ .../BlackBoxInlineCodegenTestGenerated.java | 6 +++++ ...otlinAgainstInlineKotlinTestGenerated.java | 6 +++++ ...degenWithBytecodeInlinerTestGenerated.java | 6 +++++ ...lineCodegenWithIrInlinerTestGenerated.java | 6 +++++ ...otlinAgainstInlineKotlinTestGenerated.java | 6 +++++ ...otlinAgainstInlineKotlinTestGenerated.java | 6 +++++ ...JvmIrAgainstOldBoxInlineTestGenerated.java | 6 +++++ ...JvmOldAgainstIrBoxInlineTestGenerated.java | 6 +++++ 18 files changed, 125 insertions(+), 14 deletions(-) create mode 100644 compiler/testData/codegen/boxInline/bytecodePreprocessing/inlineApiVersionAtLeastInStdlibInlineFunction.kt diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineCodegen.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineCodegen.kt index b813fcac000..884e86c1bbe 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineCodegen.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineCodegen.kt @@ -201,16 +201,7 @@ abstract class InlineCodegen( protected abstract fun generateAssertField() - private fun isInlinedToInlineFunInKotlinRuntime(): Boolean { - val codegen = this.codegen as? ExpressionCodegen ?: return false - val caller = codegen.context.functionDescriptor - if (!caller.isInline) return false - val callerPackage = DescriptorUtils.getParentOfType(caller, PackageFragmentDescriptor::class.java) ?: return false - return callerPackage.fqName.asString().let { - // package either equals to 'kotlin' or starts with 'kotlin.' - it.startsWith("kotlin") && (it.length <= 6 || it[6] == '.') - } - } + protected abstract fun isInlinedToInlineFunInKotlinRuntime(): Boolean protected fun rememberClosure(parameterType: Type, index: Int, lambdaInfo: LambdaInfo) { invocationParamBuilder.addNextValueParameter(parameterType, true, null, index).functionalArgument = lambdaInfo diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/PsiInlineCodegen.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/PsiInlineCodegen.kt index c82155ccc66..239388c9780 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/PsiInlineCodegen.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/PsiInlineCodegen.kt @@ -17,6 +17,7 @@ import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.psi.psiUtil.getParentOfType import org.jetbrains.kotlin.psi.psiUtil.isAncestor import org.jetbrains.kotlin.resolve.BindingContext +import org.jetbrains.kotlin.resolve.DescriptorUtils import org.jetbrains.kotlin.resolve.calls.util.getResolvedCallWithAssert import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall import org.jetbrains.kotlin.resolve.inline.InlineUtil @@ -185,6 +186,14 @@ class PsiInlineCodegen( putCapturedToLocalVal(stackValue, activeLambda!!.capturedVars[paramIndex], stackValue.kotlinType) override fun reorderArgumentsIfNeeded(actualArgsWithDeclIndex: List, valueParameterTypes: List) = Unit + + override fun isInlinedToInlineFunInKotlinRuntime(): Boolean { + val codegen = this.codegen as? ExpressionCodegen ?: return false + val caller = codegen.context.functionDescriptor + if (!caller.isInline) return false + val callerPackage = DescriptorUtils.getParentOfType(caller, PackageFragmentDescriptor::class.java) ?: return false + return callerPackage.fqName.asString().startsWith("kotlin.") + } } private val FunctionDescriptor.explicitParameters diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java index e3cdf592664..c618f73af36 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java @@ -1065,6 +1065,12 @@ public class FirLightTreeBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated e public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } + + @Test + @TestMetadata("inlineApiVersionAtLeastInStdlibInlineFunction.kt") + public void testInlineApiVersionAtLeastInStdlibInlineFunction() throws Exception { + runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/inlineApiVersionAtLeastInStdlibInlineFunction.kt"); + } } @Nested diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithIrInlinerTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithIrInlinerTestGenerated.java index de6a0f1f764..1f41d4c4b76 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithIrInlinerTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithIrInlinerTestGenerated.java @@ -1065,6 +1065,12 @@ public class FirLightTreeBlackBoxInlineCodegenWithIrInlinerTestGenerated extends public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } + + @Test + @TestMetadata("inlineApiVersionAtLeastInStdlibInlineFunction.kt") + public void testInlineApiVersionAtLeastInStdlibInlineFunction() throws Exception { + runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/inlineApiVersionAtLeastInStdlibInlineFunction.kt"); + } } @Nested diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java index 012c33be6cc..2b7626f703b 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -1065,6 +1065,12 @@ public class FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } + + @Test + @TestMetadata("inlineApiVersionAtLeastInStdlibInlineFunction.kt") + public void testInlineApiVersionAtLeastInStdlibInlineFunction() throws Exception { + runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/inlineApiVersionAtLeastInStdlibInlineFunction.kt"); + } } @Nested diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java index f879f554bc5..c2a3267ca98 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java @@ -1065,6 +1065,12 @@ public class FirPsiBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated extends public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } + + @Test + @TestMetadata("inlineApiVersionAtLeastInStdlibInlineFunction.kt") + public void testInlineApiVersionAtLeastInStdlibInlineFunction() throws Exception { + runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/inlineApiVersionAtLeastInStdlibInlineFunction.kt"); + } } @Nested diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithIrInlinerTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithIrInlinerTestGenerated.java index 09ae6fece93..6aa4be23a2e 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithIrInlinerTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithIrInlinerTestGenerated.java @@ -1065,6 +1065,12 @@ public class FirPsiBlackBoxInlineCodegenWithIrInlinerTestGenerated extends Abstr public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } + + @Test + @TestMetadata("inlineApiVersionAtLeastInStdlibInlineFunction.kt") + public void testInlineApiVersionAtLeastInStdlibInlineFunction() throws Exception { + runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/inlineApiVersionAtLeastInStdlibInlineFunction.kt"); + } } @Nested diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java index 1503562bcfc..cdd071e22fc 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -1065,6 +1065,12 @@ public class FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated extend public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } + + @Test + @TestMetadata("inlineApiVersionAtLeastInStdlibInlineFunction.kt") + public void testInlineApiVersionAtLeastInStdlibInlineFunction() throws Exception { + runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/inlineApiVersionAtLeastInStdlibInlineFunction.kt"); + } } @Nested diff --git a/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/IrInlineCodegen.kt b/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/IrInlineCodegen.kt index 8ade5ef9499..a4c1a83e591 100644 --- a/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/IrInlineCodegen.kt +++ b/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/IrInlineCodegen.kt @@ -9,6 +9,7 @@ import org.jetbrains.kotlin.backend.jvm.ir.isInlineOnly import org.jetbrains.kotlin.backend.jvm.ir.isInlineParameter import org.jetbrains.kotlin.backend.jvm.ir.unwrapInlineLambda import org.jetbrains.kotlin.backend.jvm.mapping.IrCallableMethod +import org.jetbrains.kotlin.builtins.StandardNames import org.jetbrains.kotlin.codegen.IrExpressionLambda import org.jetbrains.kotlin.codegen.JvmKotlinType import org.jetbrains.kotlin.codegen.StackValue @@ -21,10 +22,7 @@ import org.jetbrains.kotlin.ir.declarations.IrValueParameter import org.jetbrains.kotlin.ir.descriptors.toIrBasedKotlinType import org.jetbrains.kotlin.ir.expressions.* import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.ir.util.dump -import org.jetbrains.kotlin.ir.util.explicitParameters -import org.jetbrains.kotlin.ir.util.getArgumentsWithIr -import org.jetbrains.kotlin.ir.util.isSuspendFunction +import org.jetbrains.kotlin.ir.util.* import org.jetbrains.kotlin.resolve.jvm.AsmTypes import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodSignature import org.jetbrains.kotlin.types.KotlinType @@ -82,6 +80,11 @@ class IrInlineCodegen( codegen.classCodegen.generateAssertFieldIfNeeded(isClInit)?.accept(codegen, BlockInfo())?.discard() } + override fun isInlinedToInlineFunInKotlinRuntime(): Boolean { + val callee = codegen.irFunction + return callee.isInline && callee.getPackageFragment().packageFqName.startsWith(StandardNames.BUILT_INS_PACKAGE_NAME) + } + override fun genValueAndPut( irValueParameter: IrValueParameter, argumentExpression: IrExpression, diff --git a/compiler/testData/codegen/boxInline/bytecodePreprocessing/inlineApiVersionAtLeastInStdlibInlineFunction.kt b/compiler/testData/codegen/boxInline/bytecodePreprocessing/inlineApiVersionAtLeastInStdlibInlineFunction.kt new file mode 100644 index 00000000000..d986f0f1bea --- /dev/null +++ b/compiler/testData/codegen/boxInline/bytecodePreprocessing/inlineApiVersionAtLeastInStdlibInlineFunction.kt @@ -0,0 +1,24 @@ +// TARGET_BACKEND: JVM + +// Wrong function resolution after package renaming +// IGNORE_BACKEND: ANDROID + +// WITH_STDLIB + +// FILE: A.kt + +package kotlin.internal +fun apiVersionIsAtLeast(epic: Int, major: Int, minor: Int): Boolean { + return false +} +inline fun versionDependentInlineFun() = if (apiVersionIsAtLeast(1, 1, 0)) "Fail" else "OK" +inline fun test() = versionDependentInlineFun() + +// FILE: B.kt +import kotlin.internal.* + +fun box(): String { + val clazz = Class.forName("kotlin.internal.AKt") + val func = clazz.methods.single { it.name == "test" } + return func.invoke(null) as String +} \ No newline at end of file diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java index 0047e419aa2..2966aab548d 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java @@ -1041,6 +1041,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } + + @Test + @TestMetadata("inlineApiVersionAtLeastInStdlibInlineFunction.kt") + public void testInlineApiVersionAtLeastInStdlibInlineFunction() throws Exception { + runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/inlineApiVersionAtLeastInStdlibInlineFunction.kt"); + } } @Nested diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java index 8782b4357ef..60a208d3b24 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -1041,6 +1041,12 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } + + @Test + @TestMetadata("inlineApiVersionAtLeastInStdlibInlineFunction.kt") + public void testInlineApiVersionAtLeastInStdlibInlineFunction() throws Exception { + runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/inlineApiVersionAtLeastInStdlibInlineFunction.kt"); + } } @Nested diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java index ead57a67ba2..df2eac0c4b1 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java @@ -1065,6 +1065,12 @@ public class IrBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated extends Abs public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } + + @Test + @TestMetadata("inlineApiVersionAtLeastInStdlibInlineFunction.kt") + public void testInlineApiVersionAtLeastInStdlibInlineFunction() throws Exception { + runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/inlineApiVersionAtLeastInStdlibInlineFunction.kt"); + } } @Nested diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithIrInlinerTestGenerated.java index 3d167c5f1e8..5ffa234f4e9 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithIrInlinerTestGenerated.java @@ -1065,6 +1065,12 @@ public class IrBlackBoxInlineCodegenWithIrInlinerTestGenerated extends AbstractI public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } + + @Test + @TestMetadata("inlineApiVersionAtLeastInStdlibInlineFunction.kt") + public void testInlineApiVersionAtLeastInStdlibInlineFunction() throws Exception { + runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/inlineApiVersionAtLeastInStdlibInlineFunction.kt"); + } } @Nested diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java index 070ab002587..357e19134db 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -1065,6 +1065,12 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } + + @Test + @TestMetadata("inlineApiVersionAtLeastInStdlibInlineFunction.kt") + public void testInlineApiVersionAtLeastInStdlibInlineFunction() throws Exception { + runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/inlineApiVersionAtLeastInStdlibInlineFunction.kt"); + } } @Nested diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java index 23940c5c30b..99908e25d84 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -1065,6 +1065,12 @@ public class IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends Ab public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } + + @Test + @TestMetadata("inlineApiVersionAtLeastInStdlibInlineFunction.kt") + public void testInlineApiVersionAtLeastInStdlibInlineFunction() throws Exception { + runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/inlineApiVersionAtLeastInStdlibInlineFunction.kt"); + } } @Nested diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java index 342db44029c..fd5adf65c07 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java @@ -1065,6 +1065,12 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } + + @Test + @TestMetadata("inlineApiVersionAtLeastInStdlibInlineFunction.kt") + public void testInlineApiVersionAtLeastInStdlibInlineFunction() throws Exception { + runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/inlineApiVersionAtLeastInStdlibInlineFunction.kt"); + } } @Nested diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java index b88338c8a03..39b96a6271b 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java @@ -1041,6 +1041,12 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } + + @Test + @TestMetadata("inlineApiVersionAtLeastInStdlibInlineFunction.kt") + public void testInlineApiVersionAtLeastInStdlibInlineFunction() throws Exception { + runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/inlineApiVersionAtLeastInStdlibInlineFunction.kt"); + } } @Nested