From 5e6f52009fd706145bed89fb43bb460b96d54e61 Mon Sep 17 00:00:00 2001 From: Ilmir Usmanov Date: Tue, 23 Mar 2021 20:49:08 +0100 Subject: [PATCH] JVM IR: IC coroutines: return boxed type from suspend function if the function overrides function, returning type argument #KT-45451 Fixed --- .../FirBlackBoxCodegenTestGenerated.java | 18 +++++++++ .../backend/jvm/codegen/CoroutineCodegen.kt | 39 ++++++++++++++----- .../direct/boxTypeParameterOfSuperType.kt | 35 +++++++++++++++++ .../resume/boxTypeParameterOfSuperType.kt | 37 ++++++++++++++++++ .../boxTypeParameterOfSuperType.kt | 35 +++++++++++++++++ .../codegen/BlackBoxCodegenTestGenerated.java | 18 +++++++++ .../IrBlackBoxCodegenTestGenerated.java | 18 +++++++++ .../LightAnalysisModeTestGenerated.java | 15 +++++++ .../IrJsCodegenBoxES6TestGenerated.java | 15 +++++++ .../IrJsCodegenBoxTestGenerated.java | 15 +++++++ .../semantics/JsCodegenBoxTestGenerated.java | 15 +++++++ 11 files changed, 250 insertions(+), 10 deletions(-) create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxTypeParameterOfSuperType.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxTypeParameterOfSuperType.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxTypeParameterOfSuperType.kt diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java index 714d7d6f268..a12905d265d 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java @@ -9978,6 +9978,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendLambda.kt"); } + @Test + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void testBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxTypeParameterOfSuperType.kt"); + } + @Test @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine() throws Exception { @@ -10246,6 +10252,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendLambda.kt"); } + @Test + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void testBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxTypeParameterOfSuperType.kt"); + } + @Test @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine() throws Exception { @@ -10514,6 +10526,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendLambda.kt"); } + @Test + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void testBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxTypeParameterOfSuperType.kt"); + } + @Test @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine() throws Exception { diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/CoroutineCodegen.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/CoroutineCodegen.kt index 5af003f4f5c..3402469f560 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/CoroutineCodegen.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/CoroutineCodegen.kt @@ -10,6 +10,7 @@ import org.jetbrains.kotlin.backend.common.ir.allOverridden import org.jetbrains.kotlin.backend.common.lower.LocalDeclarationsLowering import org.jetbrains.kotlin.backend.jvm.JvmBackendContext import org.jetbrains.kotlin.backend.jvm.JvmLoweredDeclarationOrigin +import org.jetbrains.kotlin.backend.jvm.ir.erasedUpperBound import org.jetbrains.kotlin.backend.jvm.ir.isStaticInlineClassReplacement import org.jetbrains.kotlin.backend.jvm.lower.inlineclasses.unboxInlineClass import org.jetbrains.kotlin.backend.jvm.lower.isMultifileBridge @@ -28,10 +29,7 @@ import org.jetbrains.kotlin.ir.expressions.* import org.jetbrains.kotlin.ir.expressions.impl.IrErrorExpressionImpl import org.jetbrains.kotlin.ir.types.* import org.jetbrains.kotlin.ir.types.impl.makeTypeProjection -import org.jetbrains.kotlin.ir.util.file -import org.jetbrains.kotlin.ir.util.functions -import org.jetbrains.kotlin.ir.util.isSuspend -import org.jetbrains.kotlin.ir.util.parentAsClass +import org.jetbrains.kotlin.ir.util.* import org.jetbrains.kotlin.psi.KtElement import org.jetbrains.kotlin.types.Variance import org.jetbrains.org.objectweb.asm.MethodVisitor @@ -193,12 +191,33 @@ internal fun IrFunction.originalReturnTypeOfSuspendFunctionReturningUnboxedInlin // Force boxing for nullable inline class types with nullable underlying type if (returnType.isNullable() && unboxedReturnType.isNullable()) return null // Force boxing if the function overrides function with different type modulo nullability ignoring type parameters - if ((this as? IrSimpleFunction)?.let { - it.overriddenSymbols.any { overridden -> - (overridden.owner.returnType.isNullable() && overridden.owner.returnType.makeNotNull().unboxInlineClass().isNullable()) || - overridden.owner.returnType.makeNotNull().classOrNull != returnType.makeNotNull().classOrNull - } - } != false) return null + if ((this as? IrSimpleFunction)?.overridesReturningDifferentType(returnType) != false) return null // Don't box other inline classes return returnType } + +private fun IrSimpleFunction.overridesReturningDifferentType(returnType: IrType): Boolean { + val visited = hashSetOf() + + fun dfs(function: IrSimpleFunction): Boolean { + if (!visited.add(function)) return false + + for (overridden in function.overriddenSymbols) { + val owner = overridden.owner + val overriddenReturnType = owner.returnType + + if (!overriddenReturnType.erasedUpperBound.isInline) return true + + if (overriddenReturnType.isNullable() && + overriddenReturnType.makeNotNull().unboxInlineClass().isNullable() + ) return true + + if (overriddenReturnType.classOrNull != returnType.classOrNull) return true + + if (dfs(owner)) return true + } + return false + } + + return dfs(this) +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxTypeParameterOfSuperType.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxTypeParameterOfSuperType.kt new file mode 100644 index 00000000000..d228879c6eb --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxTypeParameterOfSuperType.kt @@ -0,0 +1,35 @@ +// WITH_RUNTIME +// IGNORE_BACKEND: JVM + +import kotlin.coroutines.* + +interface EntityBase { + suspend fun id(): ID +} + +inline class EntityId(val value: String) + +interface Entity : EntityBase + +class EntityStub : Entity { + override suspend fun id(): EntityId = EntityId("OK") +} + +suspend fun test(): EntityId { + val entity: Entity = EntityStub() + return entity.id() +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(Continuation(EmptyCoroutineContext) { + it.getOrThrow() + }) +} + +fun box(): String { + var res = "FAIL" + builder { + res = test().value + } + return res +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxTypeParameterOfSuperType.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxTypeParameterOfSuperType.kt new file mode 100644 index 00000000000..e11e27c72d8 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxTypeParameterOfSuperType.kt @@ -0,0 +1,37 @@ +// WITH_RUNTIME + +import kotlin.coroutines.* + +interface EntityBase { + suspend fun id(): ID +} + +inline class EntityId(val value: String) + +interface Entity : EntityBase + +var c: Continuation? = null + +class EntityStub : Entity { + override suspend fun id(): EntityId = suspendCoroutine { c = it } +} + +suspend fun test(): EntityId { + val entity: Entity = EntityStub() + return entity.id() +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(Continuation(EmptyCoroutineContext) { + it.getOrThrow() + }) +} + +fun box(): String { + var res = "FAIL" + builder { + res = test().value + } + c?.resume(EntityId("OK")) + return res +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxTypeParameterOfSuperType.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxTypeParameterOfSuperType.kt new file mode 100644 index 00000000000..fe2d511235d --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxTypeParameterOfSuperType.kt @@ -0,0 +1,35 @@ +// WITH_RUNTIME + +import kotlin.coroutines.* + +interface EntityBase { + suspend fun id(): ID +} + +inline class EntityId(val value: String) + +interface Entity : EntityBase + +var res = "FAIL" + +class EntityStub : Entity { + override suspend fun id(): EntityId = error("OK") +} + +suspend fun test(): EntityId { + val entity: Entity = EntityStub() + return entity.id() +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(Continuation(EmptyCoroutineContext) { + res = it.exceptionOrNull()!!.message!! + }) +} + +fun box(): String { + builder { + test().value + } + return res +} \ No newline at end of file diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index 299bae2420f..64d4b3c73af 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -9978,6 +9978,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendLambda.kt"); } + @Test + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void testBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxTypeParameterOfSuperType.kt"); + } + @Test @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine() throws Exception { @@ -10246,6 +10252,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendLambda.kt"); } + @Test + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void testBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxTypeParameterOfSuperType.kt"); + } + @Test @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine() throws Exception { @@ -10514,6 +10526,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendLambda.kt"); } + @Test + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void testBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxTypeParameterOfSuperType.kt"); + } + @Test @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index 32d40169b8a..e0a98d3a268 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -9978,6 +9978,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendLambda.kt"); } + @Test + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void testBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxTypeParameterOfSuperType.kt"); + } + @Test @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine() throws Exception { @@ -10246,6 +10252,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendLambda.kt"); } + @Test + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void testBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxTypeParameterOfSuperType.kt"); + } + @Test @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine() throws Exception { @@ -10514,6 +10526,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendLambda.kt"); } + @Test + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void testBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxTypeParameterOfSuperType.kt"); + } + @Test @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 3dbf9dce166..e0abd98803c 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -7872,6 +7872,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Direct extends AbstractLightAnalysisModeTest { + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void ignoreBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxTypeParameterOfSuperType.kt"); + } + private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } @@ -8100,6 +8105,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Resume extends AbstractLightAnalysisModeTest { + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void ignoreBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxTypeParameterOfSuperType.kt"); + } + private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } @@ -8328,6 +8338,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ResumeWithException extends AbstractLightAnalysisModeTest { + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void ignoreBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxTypeParameterOfSuperType.kt"); + } + private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java index ee1616d3a44..1cad83871ea 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java @@ -7054,6 +7054,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendLambda.kt"); } + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void testBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxTypeParameterOfSuperType.kt"); + } + @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine() throws Exception { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine.kt"); @@ -7282,6 +7287,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendLambda.kt"); } + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void testBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxTypeParameterOfSuperType.kt"); + } + @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine() throws Exception { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt"); @@ -7510,6 +7520,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendLambda.kt"); } + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void testBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxTypeParameterOfSuperType.kt"); + } + @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine() throws Exception { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index e4f1e9e834f..463eef3beea 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -6475,6 +6475,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendLambda.kt"); } + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void testBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxTypeParameterOfSuperType.kt"); + } + @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine() throws Exception { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine.kt"); @@ -6703,6 +6708,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendLambda.kt"); } + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void testBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxTypeParameterOfSuperType.kt"); + } + @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine() throws Exception { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt"); @@ -6931,6 +6941,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendLambda.kt"); } + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void testBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxTypeParameterOfSuperType.kt"); + } + @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine() throws Exception { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 233634b1c0d..1d4692d601a 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -6475,6 +6475,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendLambda.kt"); } + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void testBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxTypeParameterOfSuperType.kt"); + } + @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine() throws Exception { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine.kt"); @@ -6703,6 +6708,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendLambda.kt"); } + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void testBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxTypeParameterOfSuperType.kt"); + } + @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine() throws Exception { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt"); @@ -6931,6 +6941,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendLambda.kt"); } + @TestMetadata("boxTypeParameterOfSuperType.kt") + public void testBoxTypeParameterOfSuperType() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxTypeParameterOfSuperType.kt"); + } + @TestMetadata("boxUnboxInsideCoroutine.kt") public void testBoxUnboxInsideCoroutine() throws Exception { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt");