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 62f1f478df1..e64acd765f4 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.kt @@ -26,10 +26,7 @@ import org.jetbrains.kotlin.config.LanguageFeature import org.jetbrains.kotlin.config.LanguageVersionSettings import org.jetbrains.kotlin.config.LanguageVersionSettingsImpl import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.descriptors.impl.AnonymousFunctionDescriptor -import org.jetbrains.kotlin.descriptors.impl.LocalVariableAccessorDescriptor -import org.jetbrains.kotlin.descriptors.impl.LocalVariableDescriptor -import org.jetbrains.kotlin.descriptors.impl.TypeAliasConstructorDescriptor +import org.jetbrains.kotlin.descriptors.impl.* import org.jetbrains.kotlin.fileClasses.JvmFileClassUtil import org.jetbrains.kotlin.load.java.BuiltinMethodsWithSpecialGenericSignature import org.jetbrains.kotlin.load.java.JvmAbi @@ -42,7 +39,10 @@ import org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaPackageFragment import org.jetbrains.kotlin.load.kotlin.* import org.jetbrains.kotlin.load.kotlin.incremental.IncrementalPackageFragmentProvider.IncrementalMultifileClassPackageFragment import org.jetbrains.kotlin.name.* -import org.jetbrains.kotlin.psi.* +import org.jetbrains.kotlin.psi.KtBinaryExpressionWithTypeRHS +import org.jetbrains.kotlin.psi.KtExpression +import org.jetbrains.kotlin.psi.KtFunctionLiteral +import org.jetbrains.kotlin.psi.KtLambdaExpression import org.jetbrains.kotlin.psi.psiUtil.getOutermostParenthesizerOrThis import org.jetbrains.kotlin.psi.psiUtil.getQualifiedExpressionForSelector import org.jetbrains.kotlin.resolve.* @@ -64,7 +64,6 @@ import org.jetbrains.kotlin.resolve.jvm.annotations.hasJvmDefaultAnnotation import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodGenericSignature import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodParameterKind import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodSignature -import org.jetbrains.kotlin.resolve.source.KotlinSourceElement import org.jetbrains.kotlin.serialization.deserialization.descriptors.DescriptorWithContainerSource import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedCallableMemberDescriptor import org.jetbrains.kotlin.types.* @@ -379,6 +378,12 @@ class KotlinTypeMapper @JvmOverloads constructor( return originalSuspendFunction.module.builtIns.nullableAnyType } + // Lambdas, callable references, and function literals implicitly override corresponding generic method from a base class. + // NB we don't have suspend function literals so far, but we support it in back-end, just in case. + if (isFunctionLiteral(originalSuspendFunction) || isFunctionExpression(originalSuspendFunction)) { + return originalSuspendFunction.module.builtIns.nullableAnyType + } + // NB JVM view of a Kotlin function overrides JVM views of corresponding overridden functions val originalOverridden = getAllOverriddenDeclarations(functionDescriptor).map { it.unwrapInitialDescriptorForSuspendFunction().original @@ -957,16 +962,9 @@ class KotlinTypeMapper @JvmOverloads constructor( val returnType = descriptor.returnType!! - // Crude hack to determine whether it is an AnonymousFunctionDescriptor created for callable reference. - // Ideally, we should force return type boxing for all anonymous functions returning an inline class value - // (so that the result is boxed properly, since technically it is a covariant override of a corresponding generic 'invoke'). - // But, unfortunately, we can't do so right now, because it'd break binary compatibility for lambdas returning 'Result'. - if (descriptor is AnonymousFunctionDescriptor) { - val source = descriptor.source - if (source is KotlinSourceElement && source.psi is KtCallableReferenceExpression && returnType.isInlineClassType()) { - return true - } - } + // 'invoke' methods for lambdas, function literals, and callable references + // implicitly override generic 'invoke' from a corresponding base class. + if ((isFunctionExpression(descriptor) || isFunctionLiteral(descriptor)) && returnType.isInlineClassType()) return true return isJvmPrimitiveOrInlineClass(returnType) && getAllOverriddenDescriptors(descriptor).any { !isJvmPrimitiveOrInlineClass(it.returnType!!) } 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 a137920e87c..129b32f1821 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 @@ -7106,6 +7106,16 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendLambda.kt"); + } + @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); @@ -12824,6 +12834,79 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/whenWithSubject.kt"); } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class BoxReturnValueInLambda extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInBoxReturnValueInLambda() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("boxAny.kt") + public void testBoxAny() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxAny.kt"); + } + + @TestMetadata("boxFunLiteralAny.kt") + public void testBoxFunLiteralAny() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxFunLiteralAny.kt"); + } + + @TestMetadata("boxInt.kt") + public void testBoxInt() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxInt.kt"); + } + + @TestMetadata("boxNullableAny.kt") + public void testBoxNullableAny() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAny.kt"); + } + + @TestMetadata("boxNullableAnyNull.kt") + public void testBoxNullableAnyNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNull.kt"); + } + + @TestMetadata("boxNullableInt.kt") + public void testBoxNullableInt() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableInt.kt"); + } + + @TestMetadata("boxNullableIntNull.kt") + public void testBoxNullableIntNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNull.kt"); + } + + @TestMetadata("boxNullableString.kt") + public void testBoxNullableString() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableString.kt"); + } + + @TestMetadata("boxNullableStringNull.kt") + public void testBoxNullableStringNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNull.kt"); + } + + @TestMetadata("boxString.kt") + public void testBoxString() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxString.kt"); + } + + @TestMetadata("kt27586_1.kt") + public void testKt27586_1() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_1.kt"); + } + + @TestMetadata("kt27586_2.kt") + public void testKt27586_2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_2.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReference.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReference.kt new file mode 100644 index 00000000000..4a0c545d52a --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReference.kt @@ -0,0 +1,27 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// IGNORE_BACKEND: JS_IR +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +inline class R(val x: Any) + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +suspend fun call(fn: suspend () -> T) = fn() + +fun useR(r: R) = if (r.x == "OK") "OK" else "fail: $r" + +suspend fun ok() = R("OK") + +fun box(): String { + var res: String = "fail" + builder { + res = useR(call(::ok)) + } + return res +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendLambda.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendLambda.kt new file mode 100644 index 00000000000..3d4c5e743d4 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendLambda.kt @@ -0,0 +1,25 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// IGNORE_BACKEND: JS_IR +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +inline class R(val x: Any) + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +suspend fun call(fn: suspend () -> T) = fn() + +fun useR(r: R) = if (r.x == "OK") "OK" else "fail: $r" + +fun box(): String { + var res: String = "fail" + builder { + res = useR(call { R("OK") }) + } + return res +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxAny.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxAny.kt new file mode 100644 index 00000000000..98da30bce63 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxAny.kt @@ -0,0 +1,10 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// IGNORE_BACKEND: JVM_IR + +inline class X(val x: Any) + +fun useX(x: X): String = x.x as String + +fun call(fn: () -> T) = fn() + +fun box() = useX(call { X("OK") }) \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxFunLiteralAny.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxFunLiteralAny.kt new file mode 100644 index 00000000000..2a0155faac3 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxFunLiteralAny.kt @@ -0,0 +1,10 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// IGNORE_BACKEND: JVM_IR + +inline class X(val x: Any) + +fun useX(x: X): String = x.x as String + +fun call(fn: () -> T) = fn() + +fun box() = useX(call(fun(): X { return X("OK") })) \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxInt.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxInt.kt new file mode 100644 index 00000000000..1bdea6559de --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxInt.kt @@ -0,0 +1,9 @@ +// IGNORE_BACKEND: JVM_IR + +inline class X(val x: Int) + +fun useX(x: X): String = if (x.x == 42) "OK" else "fail: $x" + +fun call(fn: () -> T) = fn() + +fun box() = useX(call { X(42) }) \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAny.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAny.kt new file mode 100644 index 00000000000..2b28c2cb044 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAny.kt @@ -0,0 +1,10 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// IGNORE_BACKEND: JVM_IR + +inline class X(val x: Any?) + +fun useX(x: X): String = x.x as String + +fun call(fn: () -> T) = fn() + +fun box() = useX(call { X("OK") }) \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNull.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNull.kt new file mode 100644 index 00000000000..172fe59dc94 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNull.kt @@ -0,0 +1,10 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// IGNORE_BACKEND: JVM_IR + +inline class X(val x: Any?) + +fun useX(x: X): String = if (x.x == null) "OK" else "fail: $x" + +fun call(fn: () -> T) = fn() + +fun box() = useX(call { X(null) }) \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableInt.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableInt.kt new file mode 100644 index 00000000000..e8e24ee7e7f --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableInt.kt @@ -0,0 +1,9 @@ +// IGNORE_BACKEND: JVM_IR + +inline class X(val x: Int?) + +fun useX(x: X): String = if (x.x == 42) "OK" else "fail: $x" + +fun call(fn: () -> T) = fn() + +fun box() = useX(call { X(42) }) \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNull.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNull.kt new file mode 100644 index 00000000000..60869d6fb09 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNull.kt @@ -0,0 +1,9 @@ +// IGNORE_BACKEND: JVM_IR + +inline class X(val x: Int?) + +fun useX(x: X): String = if (x.x == null) "OK" else "fail: $x" + +fun call(fn: () -> T) = fn() + +fun box() = useX(call { X(null) }) \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableString.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableString.kt new file mode 100644 index 00000000000..78a21b7e118 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableString.kt @@ -0,0 +1,9 @@ +// IGNORE_BACKEND: JVM_IR + +inline class X(val x: String?) + +fun useX(x: X): String = x.x ?: "fail: $x" + +fun call(fn: () -> T) = fn() + +fun box() = useX(call { X("OK") }) \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNull.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNull.kt new file mode 100644 index 00000000000..0f98f93bd7c --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNull.kt @@ -0,0 +1,9 @@ +// IGNORE_BACKEND: JVM_IR + +inline class X(val x: String?) + +fun useX(x: X): String = if (x.x == null) "OK" else "fail: $x" + +fun call(fn: () -> T) = fn() + +fun box() = useX(call { X(null) }) \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxString.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxString.kt new file mode 100644 index 00000000000..bfabdc95ac4 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxString.kt @@ -0,0 +1,9 @@ +// IGNORE_BACKEND: JVM_IR + +inline class X(val x: String) + +fun useX(x: X): String = x.x + +fun call(fn: () -> T) = fn() + +fun box() = useX(call { X("OK") }) \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_1.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_1.kt new file mode 100644 index 00000000000..9ccefe34636 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_1.kt @@ -0,0 +1,16 @@ +// WITH_RUNTIME +// IGNORE_BACKEND_FIR: JVM_IR +// IGNORE_BACKEND: JVM_IR + +fun f1(): () -> Result { + return { + runCatching { + "OK" + } + } +} + +fun box(): String { + val r = f1()() + return r.getOrNull() ?: "fail: $r" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_2.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_2.kt new file mode 100644 index 00000000000..ca519b3acef --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_2.kt @@ -0,0 +1,14 @@ +// WITH_RUNTIME +// IGNORE_BACKEND_FIR: JVM_IR +// IGNORE_BACKEND: JVM_IR + +fun f1() = lazy { + runCatching { + "OK" + } +} + +fun box(): String { + val r = f1().value + return r.getOrNull() ?: "fail: $r" +} \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeText/inlineClasses/boxingForNonLocalAndLabeledReturnsOfInlineClasses.kt b/compiler/testData/codegen/bytecodeText/inlineClasses/boxingForNonLocalAndLabeledReturnsOfInlineClasses.kt index 1d9b0798b95..56ab01062a2 100644 --- a/compiler/testData/codegen/bytecodeText/inlineClasses/boxingForNonLocalAndLabeledReturnsOfInlineClasses.kt +++ b/compiler/testData/codegen/bytecodeText/inlineClasses/boxingForNonLocalAndLabeledReturnsOfInlineClasses.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// IGNORE_BACKEND: JVM_IR // FILE: utils.kt @@ -21,13 +22,13 @@ fun foo(): Boolean = true fun labeled(): ULong? { val u = ULong(0) return run { - if (foo()) return@run u + if (foo()) return@run u // box u // box } } // @TestKt.class: -// 2 INVOKESTATIC ULong\.box +// 3 INVOKESTATIC ULong\.box // 0 INVOKEVIRTUAL ULong.unbox // 0 valueOf diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index 11f82f9029a..10aaa239f2b 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -7811,6 +7811,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendLambda.kt"); + } + @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine_1_2() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt", "kotlin.coroutines.experimental"); @@ -14039,6 +14049,79 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/whenWithSubject.kt"); } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class BoxReturnValueInLambda extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInBoxReturnValueInLambda() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("boxAny.kt") + public void testBoxAny() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxAny.kt"); + } + + @TestMetadata("boxFunLiteralAny.kt") + public void testBoxFunLiteralAny() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxFunLiteralAny.kt"); + } + + @TestMetadata("boxInt.kt") + public void testBoxInt() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxInt.kt"); + } + + @TestMetadata("boxNullableAny.kt") + public void testBoxNullableAny() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAny.kt"); + } + + @TestMetadata("boxNullableAnyNull.kt") + public void testBoxNullableAnyNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNull.kt"); + } + + @TestMetadata("boxNullableInt.kt") + public void testBoxNullableInt() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableInt.kt"); + } + + @TestMetadata("boxNullableIntNull.kt") + public void testBoxNullableIntNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNull.kt"); + } + + @TestMetadata("boxNullableString.kt") + public void testBoxNullableString() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableString.kt"); + } + + @TestMetadata("boxNullableStringNull.kt") + public void testBoxNullableStringNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNull.kt"); + } + + @TestMetadata("boxString.kt") + public void testBoxString() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxString.kt"); + } + + @TestMetadata("kt27586_1.kt") + public void testKt27586_1() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_1.kt"); + } + + @TestMetadata("kt27586_2.kt") + public void testKt27586_2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_2.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 04bc4906c4e..d8742c25e7f 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -7811,6 +7811,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendLambda.kt"); + } + @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine_1_2() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt", "kotlin.coroutines.experimental"); @@ -14039,6 +14049,79 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/whenWithSubject.kt"); } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class BoxReturnValueInLambda extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInBoxReturnValueInLambda() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("boxAny.kt") + public void testBoxAny() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxAny.kt"); + } + + @TestMetadata("boxFunLiteralAny.kt") + public void testBoxFunLiteralAny() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxFunLiteralAny.kt"); + } + + @TestMetadata("boxInt.kt") + public void testBoxInt() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxInt.kt"); + } + + @TestMetadata("boxNullableAny.kt") + public void testBoxNullableAny() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAny.kt"); + } + + @TestMetadata("boxNullableAnyNull.kt") + public void testBoxNullableAnyNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNull.kt"); + } + + @TestMetadata("boxNullableInt.kt") + public void testBoxNullableInt() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableInt.kt"); + } + + @TestMetadata("boxNullableIntNull.kt") + public void testBoxNullableIntNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNull.kt"); + } + + @TestMetadata("boxNullableString.kt") + public void testBoxNullableString() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableString.kt"); + } + + @TestMetadata("boxNullableStringNull.kt") + public void testBoxNullableStringNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNull.kt"); + } + + @TestMetadata("boxString.kt") + public void testBoxString() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxString.kt"); + } + + @TestMetadata("kt27586_1.kt") + public void testKt27586_1() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_1.kt"); + } + + @TestMetadata("kt27586_2.kt") + public void testKt27586_2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_2.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index d3906f4b2b3..08f9d874bd9 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -7106,6 +7106,16 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendLambda.kt"); + } + @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); @@ -12824,6 +12834,79 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/whenWithSubject.kt"); } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class BoxReturnValueInLambda extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInBoxReturnValueInLambda() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("boxAny.kt") + public void testBoxAny() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxAny.kt"); + } + + @TestMetadata("boxFunLiteralAny.kt") + public void testBoxFunLiteralAny() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxFunLiteralAny.kt"); + } + + @TestMetadata("boxInt.kt") + public void testBoxInt() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxInt.kt"); + } + + @TestMetadata("boxNullableAny.kt") + public void testBoxNullableAny() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAny.kt"); + } + + @TestMetadata("boxNullableAnyNull.kt") + public void testBoxNullableAnyNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNull.kt"); + } + + @TestMetadata("boxNullableInt.kt") + public void testBoxNullableInt() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableInt.kt"); + } + + @TestMetadata("boxNullableIntNull.kt") + public void testBoxNullableIntNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNull.kt"); + } + + @TestMetadata("boxNullableString.kt") + public void testBoxNullableString() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableString.kt"); + } + + @TestMetadata("boxNullableStringNull.kt") + public void testBoxNullableStringNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNull.kt"); + } + + @TestMetadata("boxString.kt") + public void testBoxString() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxString.kt"); + } + + @TestMetadata("kt27586_1.kt") + public void testKt27586_1() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_1.kt"); + } + + @TestMetadata("kt27586_2.kt") + public void testKt27586_2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_2.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index 38b56a5307f..688ba12e33a 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -6036,6 +6036,16 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendLambda.kt"); + } + @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); @@ -11039,6 +11049,79 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/whenWithSubject.kt"); } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class BoxReturnValueInLambda extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInBoxReturnValueInLambda() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("boxAny.kt") + public void testBoxAny() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxAny.kt"); + } + + @TestMetadata("boxFunLiteralAny.kt") + public void testBoxFunLiteralAny() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxFunLiteralAny.kt"); + } + + @TestMetadata("boxInt.kt") + public void testBoxInt() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxInt.kt"); + } + + @TestMetadata("boxNullableAny.kt") + public void testBoxNullableAny() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAny.kt"); + } + + @TestMetadata("boxNullableAnyNull.kt") + public void testBoxNullableAnyNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNull.kt"); + } + + @TestMetadata("boxNullableInt.kt") + public void testBoxNullableInt() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableInt.kt"); + } + + @TestMetadata("boxNullableIntNull.kt") + public void testBoxNullableIntNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNull.kt"); + } + + @TestMetadata("boxNullableString.kt") + public void testBoxNullableString() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableString.kt"); + } + + @TestMetadata("boxNullableStringNull.kt") + public void testBoxNullableStringNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNull.kt"); + } + + @TestMetadata("boxString.kt") + public void testBoxString() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxString.kt"); + } + + @TestMetadata("kt27586_1.kt") + public void testKt27586_1() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_1.kt"); + } + + @TestMetadata("kt27586_2.kt") + public void testKt27586_2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_2.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 9bc0b52400b..ea9f47d167f 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -6036,6 +6036,16 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); } + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendLambda.kt"); + } + @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); @@ -11104,6 +11114,79 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/whenWithSubject.kt"); } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class BoxReturnValueInLambda extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInBoxReturnValueInLambda() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("boxAny.kt") + public void testBoxAny() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxAny.kt"); + } + + @TestMetadata("boxFunLiteralAny.kt") + public void testBoxFunLiteralAny() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxFunLiteralAny.kt"); + } + + @TestMetadata("boxInt.kt") + public void testBoxInt() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxInt.kt"); + } + + @TestMetadata("boxNullableAny.kt") + public void testBoxNullableAny() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAny.kt"); + } + + @TestMetadata("boxNullableAnyNull.kt") + public void testBoxNullableAnyNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNull.kt"); + } + + @TestMetadata("boxNullableInt.kt") + public void testBoxNullableInt() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableInt.kt"); + } + + @TestMetadata("boxNullableIntNull.kt") + public void testBoxNullableIntNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNull.kt"); + } + + @TestMetadata("boxNullableString.kt") + public void testBoxNullableString() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableString.kt"); + } + + @TestMetadata("boxNullableStringNull.kt") + public void testBoxNullableStringNull() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNull.kt"); + } + + @TestMetadata("boxString.kt") + public void testBoxString() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxString.kt"); + } + + @TestMetadata("kt27586_1.kt") + public void testKt27586_1() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_1.kt"); + } + + @TestMetadata("kt27586_2.kt") + public void testKt27586_2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/kt27586_2.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)