From 7cbd0674606c5a0a47b087aea3cf48eea692a4b6 Mon Sep 17 00:00:00 2001 From: Ilmir Usmanov Date: Wed, 2 Sep 2020 21:15:05 +0200 Subject: [PATCH] Add tests with resume path --- .../ir/FirBlackBoxCodegenTestGenerated.java | 721 +++++++++--- ...oxReturnValueOfSuspendFunctionReference.kt | 0 .../boxReturnValueOfSuspendLambda.kt | 0 .../{ => direct}/boxUnboxInsideCoroutine.kt | 21 +- .../boxUnboxInsideCoroutine_Any.kt | 21 +- .../boxUnboxInsideCoroutine_InlineAny.kt | 21 +- .../boxUnboxInsideCoroutine_InlineInt.kt | 21 +- .../boxUnboxInsideCoroutine_Int.kt | 21 +- .../boxUnboxInsideCoroutine_Long.kt | 21 +- .../boxUnboxInsideCoroutine_NAny.kt | 21 +- .../boxUnboxInsideCoroutine_nonLocalReturn.kt | 21 +- .../boxUnboxInsideCoroutine_suspendFunType.kt | 8 +- .../bridgeGenerationCrossinline.kt | 0 .../{ => direct}/bridgeGenerationNonInline.kt | 0 .../covariantOverrideSuspendFun.kt | 0 ...errideSuspendFunWithNullableInlineClass.kt | 0 ...deSuspendFunWithNullableInlineClass_Any.kt | 0 ...deSuspendFunWithNullableInlineClass_Int.kt | 0 ...dFunWithNullableInlineClass_NullableAny.kt | 0 ...ithNullableInlineClass_NullableAny_null.kt | 0 ...dFunWithNullableInlineClass_NullableInt.kt | 0 ...ithNullableInlineClass_NullableInt_null.kt | 0 .../covariantOverrideSuspendFun_Any.kt | 0 .../covariantOverrideSuspendFun_Int.kt | 0 .../{ => direct}/genericOverrideSuspendFun.kt | 0 .../genericOverrideSuspendFun_Any.kt | 0 ...ndFun_Any_NullableInlineClassUpperBound.kt | 0 .../genericOverrideSuspendFun_Int.kt | 0 .../genericOverrideSuspendFun_NullableAny.kt | 0 ...ericOverrideSuspendFun_NullableAny_null.kt | 0 .../genericOverrideSuspendFun_NullableInt.kt | 0 ...ericOverrideSuspendFun_NullableInt_null.kt | 0 .../interfaceDelegateWithInlineClass.kt | 0 .../{ => direct}/overrideSuspendFun.kt | 21 +- .../{ => direct}/overrideSuspendFun_Any.kt | 21 +- .../overrideSuspendFun_Any_itf.kt | 0 .../overrideSuspendFun_Any_this.kt | 0 .../{ => direct}/overrideSuspendFun_Int.kt | 21 +- .../inlineClasses/direct/returnResult.kt | 26 + ...xReturnValueOfSuspendFunctionReference.kt} | 1 - .../resume/boxReturnValueOfSuspendLambda.kt | 26 + .../resume/boxUnboxInsideCoroutine.kt | 91 ++ .../resume/boxUnboxInsideCoroutine_Any.kt | 91 ++ .../boxUnboxInsideCoroutine_InlineAny.kt | 94 ++ .../boxUnboxInsideCoroutine_InlineInt.kt | 97 ++ .../resume/boxUnboxInsideCoroutine_Int.kt | 94 ++ .../resume/boxUnboxInsideCoroutine_Long.kt | 94 ++ .../resume/boxUnboxInsideCoroutine_NAny.kt | 91 ++ .../boxUnboxInsideCoroutine_nonLocalReturn.kt | 97 ++ .../boxUnboxInsideCoroutine_suspendFunType.kt | 51 + .../resume/bridgeGenerationCrossinline.kt | 54 + .../resume/bridgeGenerationNonInline.kt | 54 + .../resume/covariantOverrideSuspendFun.kt | 53 + ...errideSuspendFunWithNullableInlineClass.kt | 55 + ...deSuspendFunWithNullableInlineClass_Any.kt | 54 + ...deSuspendFunWithNullableInlineClass_Int.kt | 57 + ...dFunWithNullableInlineClass_NullableAny.kt | 54 + ...ithNullableInlineClass_NullableAny_null.kt | 60 + ...dFunWithNullableInlineClass_NullableInt.kt | 57 + ...ithNullableInlineClass_NullableInt_null.kt | 57 + .../resume/covariantOverrideSuspendFun_Any.kt | 55 + .../resume/covariantOverrideSuspendFun_Int.kt | 58 + .../resume/genericOverrideSuspendFun.kt | 36 + .../resume/genericOverrideSuspendFun_Any.kt | 37 + ...ndFun_Any_NullableInlineClassUpperBound.kt | 36 + .../resume/genericOverrideSuspendFun_Int.kt | 39 + .../genericOverrideSuspendFun_NullableAny.kt | 37 + ...ericOverrideSuspendFun_NullableAny_null.kt | 39 + .../genericOverrideSuspendFun_NullableInt.kt | 39 + ...ericOverrideSuspendFun_NullableInt_null.kt | 39 + .../interfaceDelegateWithInlineClass.kt | 47 + .../resume/overrideSuspendFun.kt | 104 ++ .../resume/overrideSuspendFun_Any.kt | 98 ++ .../resume/overrideSuspendFun_Any_itf.kt | 45 + .../resume/overrideSuspendFun_Any_this.kt | 44 + .../resume/overrideSuspendFun_Int.kt | 107 ++ .../inlineClasses/resume/returnResult.kt | 31 + ...oxReturnValueOfSuspendFunctionReference.kt | 32 + .../boxReturnValueOfSuspendLambda.kt | 29 + .../boxUnboxInsideCoroutine.kt | 93 ++ .../boxUnboxInsideCoroutine_Any.kt | 93 ++ .../boxUnboxInsideCoroutine_InlineAny.kt | 96 ++ .../boxUnboxInsideCoroutine_InlineInt.kt | 99 ++ .../boxUnboxInsideCoroutine_Int.kt | 96 ++ .../boxUnboxInsideCoroutine_Long.kt | 96 ++ .../boxUnboxInsideCoroutine_NAny.kt | 93 ++ .../boxUnboxInsideCoroutine_nonLocalReturn.kt | 99 ++ .../boxUnboxInsideCoroutine_suspendFunType.kt | 53 + .../bridgeGenerationCrossinline.kt | 58 + .../bridgeGenerationNonInline.kt | 58 + .../covariantOverrideSuspendFun.kt | 56 + ...errideSuspendFunWithNullableInlineClass.kt | 58 + ...deSuspendFunWithNullableInlineClass_Any.kt | 57 + ...deSuspendFunWithNullableInlineClass_Int.kt | 60 + ...dFunWithNullableInlineClass_NullableAny.kt | 57 + ...ithNullableInlineClass_NullableAny_null.kt | 63 + ...dFunWithNullableInlineClass_NullableInt.kt | 60 + .../covariantOverrideSuspendFun_Any.kt | 58 + .../covariantOverrideSuspendFun_Int.kt | 61 + .../genericOverrideSuspendFun.kt | 39 + .../genericOverrideSuspendFun_Any.kt | 40 + ...ndFun_Any_NullableInlineClassUpperBound.kt | 39 + .../genericOverrideSuspendFun_Int.kt | 42 + .../genericOverrideSuspendFun_NullableAny.kt | 40 + .../genericOverrideSuspendFun_NullableInt.kt | 42 + .../interfaceDelegateWithInlineClass.kt | 49 + .../resumeWithException/overrideSuspendFun.kt | 106 ++ .../overrideSuspendFun_Any.kt | 101 ++ .../overrideSuspendFun_Any_itf.kt | 48 + .../overrideSuspendFun_Any_this.kt | 47 + .../overrideSuspendFun_Int.kt | 109 ++ .../{ => resumeWithException}/returnResult.kt | 9 +- .../codegen/BlackBoxCodegenTestGenerated.java | 1027 +++++++++++++---- .../LightAnalysisModeTestGenerated.java | 1027 +++++++++++++---- .../ir/IrBlackBoxCodegenTestGenerated.java | 721 +++++++++--- .../IrJsCodegenBoxES6TestGenerated.java | 721 +++++++++--- .../IrJsCodegenBoxTestGenerated.java | 721 +++++++++--- .../semantics/JsCodegenBoxTestGenerated.java | 721 +++++++++--- 118 files changed, 8989 insertions(+), 1444 deletions(-) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/boxReturnValueOfSuspendFunctionReference.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/boxReturnValueOfSuspendLambda.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/boxUnboxInsideCoroutine.kt (69%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/boxUnboxInsideCoroutine_Any.kt (70%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/boxUnboxInsideCoroutine_InlineAny.kt (71%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/boxUnboxInsideCoroutine_InlineInt.kt (72%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/boxUnboxInsideCoroutine_Int.kt (71%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/boxUnboxInsideCoroutine_Long.kt (71%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/boxUnboxInsideCoroutine_NAny.kt (70%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/boxUnboxInsideCoroutine_nonLocalReturn.kt (71%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/boxUnboxInsideCoroutine_suspendFunType.kt (81%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/bridgeGenerationCrossinline.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/bridgeGenerationNonInline.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/covariantOverrideSuspendFun.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/covariantOverrideSuspendFunWithNullableInlineClass.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/covariantOverrideSuspendFun_Any.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/covariantOverrideSuspendFun_Int.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/genericOverrideSuspendFun.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/genericOverrideSuspendFun_Any.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/genericOverrideSuspendFun_Int.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/genericOverrideSuspendFun_NullableAny.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/genericOverrideSuspendFun_NullableAny_null.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/genericOverrideSuspendFun_NullableInt.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/genericOverrideSuspendFun_NullableInt_null.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/interfaceDelegateWithInlineClass.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/overrideSuspendFun.kt (73%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/overrideSuspendFun_Any.kt (73%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/overrideSuspendFun_Any_itf.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/overrideSuspendFun_Any_this.kt (100%) rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => direct}/overrideSuspendFun_Int.kt (75%) create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/direct/returnResult.kt rename compiler/testData/codegen/box/coroutines/inlineClasses/{boxReturnValueOfSuspendFunctionReferenceResume.kt => resume/boxReturnValueOfSuspendFunctionReference.kt} (95%) create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendLambda.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Any.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineAny.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineInt.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Int.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Long.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_NAny.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_nonLocalReturn.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_suspendFunType.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationCrossinline.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationNonInline.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Any.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Int.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Int.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny_null.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt_null.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_itf.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_this.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Int.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/returnResult.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendFunctionReference.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendLambda.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Any.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineAny.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineInt.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Int.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Long.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_NAny.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_nonLocalReturn.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_suspendFunType.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationCrossinline.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationNonInline.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Any.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Int.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Int.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableAny.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableInt.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_itf.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_this.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Int.kt rename compiler/testData/codegen/box/coroutines/inlineClasses/{ => resumeWithException}/returnResult.kt (65%) 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 e6319ff933a..9bd364e5426 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 @@ -7428,207 +7428,614 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); } - private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - public void testAllFilesPresentInInlineClasses() throws Exception { 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("compiler/testData/codegen/box/coroutines/inlineClasses/direct") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Direct extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInDirect() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/direct"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendLambda.kt"); + } + + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } + + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableAny.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") + public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableAny_null.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableInt.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") + public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableInt_null.kt"); + } + + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/returnResult.kt"); + } } - @TestMetadata("boxReturnValueOfSuspendFunctionReferenceResume.kt") - public void testBoxReturnValueOfSuspendFunctionReferenceResume() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReferenceResume.kt"); + @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resume") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Resume extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInResume() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resume"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendLambda.kt"); + } + + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } + + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") + public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny_null.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") + public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt_null.kt"); + } + + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/returnResult.kt"); + } } - @TestMetadata("boxReturnValueOfSuspendLambda.kt") - public void testBoxReturnValueOfSuspendLambda() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendLambda.kt"); - } + @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ResumeWithException extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } - @TestMetadata("boxUnboxInsideCoroutine.kt") - public void testBoxUnboxInsideCoroutine_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); - } + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } - @TestMetadata("boxUnboxInsideCoroutine_Any.kt") - public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); - } + public void testAllFilesPresentInResumeWithException() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } - @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") - public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); - } + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendFunctionReference.kt"); + } - @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") - public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); - } + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendLambda.kt"); + } - @TestMetadata("boxUnboxInsideCoroutine_Int.kt") - public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_Long.kt") - public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") - public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") - public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") - public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } - @TestMetadata("bridgeGenerationCrossinline.kt") - public void testBridgeGenerationCrossinline_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } - @TestMetadata("bridgeGenerationNonInline.kt") - public void testBridgeGenerationNonInline_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationNonInline.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFun.kt") - public void testCovariantOverrideSuspendFun() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun.kt"); - } + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass.kt"); - } + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); - } + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); - } + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); - } + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } - @TestMetadata("covariantOverrideSuspendFun_Any.kt") - public void testCovariantOverrideSuspendFun_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun_Any.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } - @TestMetadata("covariantOverrideSuspendFun_Int.kt") - public void testCovariantOverrideSuspendFun_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun_Int.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } - @TestMetadata("genericOverrideSuspendFun.kt") - public void testGenericOverrideSuspendFun() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Any.kt") - public void testGenericOverrideSuspendFun_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Any.kt"); - } + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Any.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") - public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); - } + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Int.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Int.kt") - public void testGenericOverrideSuspendFun_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Int.kt"); - } + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") - public void testGenericOverrideSuspendFun_NullableAny() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableAny.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") - public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableAny_null.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") - public void testGenericOverrideSuspendFun_NullableInt() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableInt.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Int.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") - public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableInt_null.kt"); - } + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableAny.kt"); + } - @TestMetadata("interfaceDelegateWithInlineClass.kt") - public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); - } + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableInt.kt"); + } - @TestMetadata("overrideSuspendFun.kt") - public void testOverrideSuspendFun_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun.kt", "kotlin.coroutines"); - } + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any.kt") - public void testOverrideSuspendFun_Any_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any_itf.kt") - public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any_this.kt") - public void testOverrideSuspendFun_Any_this_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Int.kt") - public void testOverrideSuspendFun_Int_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Int.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } - @TestMetadata("returnResult.kt") - public void testReturnResult() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/returnResult.kt"); + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/returnResult.kt"); + } } } diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReference.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendFunctionReference.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReference.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendFunctionReference.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendLambda.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendLambda.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendLambda.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendLambda.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine.kt similarity index 69% rename from compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine.kt index 3950b6ac7b6..50768e1f589 100644 --- a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine.kt @@ -15,12 +15,7 @@ inline class IC(val s: String) class Test1() { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun qux(ss: IC): IC = IC(ss.s) @@ -36,12 +31,7 @@ class Test1() { class Test2 { - suspend fun foo(value: IC): IC { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: IC): IC = value suspend fun qux(s: String): IC = IC(s) @@ -55,12 +45,7 @@ class Test2 { } class Test3 { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun bar(): IC { return foo(IC("OK")) diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Any.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Any.kt similarity index 70% rename from compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Any.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Any.kt index 695c496415d..5db8f8a566b 100644 --- a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Any.kt +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Any.kt @@ -15,12 +15,7 @@ inline class IC(val s: Any) class Test1() { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun qux(ss: IC): IC = IC(ss.s) @@ -36,12 +31,7 @@ class Test1() { class Test2 { - suspend fun foo(value: IC): IC { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: IC): IC = value suspend fun qux(s: String): IC = IC(s) @@ -55,12 +45,7 @@ class Test2 { } class Test3 { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun bar(): IC { return foo(IC("OK")) diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineAny.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineAny.kt similarity index 71% rename from compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineAny.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineAny.kt index a1f341d3edc..e5d201fdd82 100644 --- a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineAny.kt +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineAny.kt @@ -18,12 +18,7 @@ inline class IC(val s: I0) class Test1() { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun qux(ss: IC): IC = IC(ss.s) @@ -39,12 +34,7 @@ class Test1() { class Test2 { - suspend fun foo(value: IC): IC { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: IC): IC = value suspend fun qux(s: String): IC = IC(I0(s)) @@ -58,12 +48,7 @@ class Test2 { } class Test3 { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun bar(): IC { return foo(IC(I0("OK"))) diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineInt.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineInt.kt similarity index 72% rename from compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineInt.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineInt.kt index f9bf01661d4..ab485ceb801 100644 --- a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineInt.kt +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineInt.kt @@ -18,12 +18,7 @@ inline class IC(val s: I0) class Test1() { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun qux(ss: IC): IC = IC(ss.s) @@ -39,12 +34,7 @@ class Test1() { class Test2 { - suspend fun foo(value: IC): IC { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: IC): IC = value suspend fun qux(s: Int): IC = IC(I0(s)) @@ -58,12 +48,7 @@ class Test2 { } class Test3 { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun bar(): IC { return foo(IC(I0(42))) diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Int.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Int.kt similarity index 71% rename from compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Int.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Int.kt index 3a0b13d5fe4..b4078fefef5 100644 --- a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Int.kt +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Int.kt @@ -15,12 +15,7 @@ inline class IC(val s: Int) class Test1() { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun qux(ss: IC): IC = IC(ss.s) @@ -36,12 +31,7 @@ class Test1() { class Test2 { - suspend fun foo(value: IC): IC { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: IC): IC = value suspend fun qux(s: Int): IC = IC(s) @@ -55,12 +45,7 @@ class Test2 { } class Test3 { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun bar(): IC { return foo(IC(42)) diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Long.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Long.kt similarity index 71% rename from compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Long.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Long.kt index ea5a3500b3b..8c38adfaa5a 100644 --- a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Long.kt +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Long.kt @@ -15,12 +15,7 @@ inline class IC(val s: Long) class Test1() { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun qux(ss: IC): IC = IC(ss.s) @@ -36,12 +31,7 @@ class Test1() { class Test2 { - suspend fun foo(value: IC): IC { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: IC): IC = value suspend fun qux(s: Long): IC = IC(s) @@ -55,12 +45,7 @@ class Test2 { } class Test3 { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun bar(): IC { return foo(IC(42L)) diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_NAny.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_NAny.kt similarity index 70% rename from compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_NAny.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_NAny.kt index 5331469fb46..c993eb6e897 100644 --- a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_NAny.kt +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_NAny.kt @@ -15,12 +15,7 @@ inline class IC(val s: Any?) class Test1() { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun qux(ss: IC): IC = IC(ss.s) @@ -36,12 +31,7 @@ class Test1() { class Test2 { - suspend fun foo(value: IC): IC { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: IC): IC = value suspend fun qux(s: String): IC = IC(s) @@ -55,12 +45,7 @@ class Test2 { } class Test3 { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun bar(): IC { return foo(IC("OK")) diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_nonLocalReturn.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_nonLocalReturn.kt similarity index 71% rename from compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_nonLocalReturn.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_nonLocalReturn.kt index 9fe724cf2d6..a401c993376 100644 --- a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_nonLocalReturn.kt +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_nonLocalReturn.kt @@ -15,12 +15,7 @@ inline class IC(val s: String) class Test1() { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun qux(ss: IC): IC = IC(ss.s) @@ -38,12 +33,7 @@ class Test1() { class Test2 { - suspend fun foo(value: IC): IC { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: IC): IC = value suspend fun qux(s: String): IC = IC(s) @@ -59,12 +49,7 @@ class Test2 { } class Test3 { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun bar(): IC { run { diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_suspendFunType.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_suspendFunType.kt similarity index 81% rename from compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_suspendFunType.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_suspendFunType.kt index b4f9473f100..673673cf0c7 100644 --- a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_suspendFunType.kt +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_suspendFunType.kt @@ -1,6 +1,7 @@ // WITH_RUNTIME // WITH_COROUTINES // COMMON_COROUTINES_TEST +// IGNORE_BACKEND: JS_IR import helpers.* import COROUTINES_PACKAGE.* @@ -17,12 +18,7 @@ fun suspendFunId(block: suspend () -> IC) = block class Test1() { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun qux(ss: IC): IC = IC(ss.s) diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationCrossinline.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationCrossinline.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationCrossinline.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationCrossinline.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationNonInline.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationNonInline.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationNonInline.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationNonInline.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun_Any.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Any.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun_Any.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Any.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun_Int.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Int.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun_Int.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Int.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Any.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Any.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Any.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Any.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Int.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Int.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Int.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Int.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableAny.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableAny.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableAny.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableAny.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableAny_null.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableAny_null.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableAny_null.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableAny_null.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableInt.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableInt.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableInt.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableInt.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableInt_null.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableInt_null.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableInt_null.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableInt_null.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/interfaceDelegateWithInlineClass.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/interfaceDelegateWithInlineClass.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/interfaceDelegateWithInlineClass.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/interfaceDelegateWithInlineClass.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt similarity index 73% rename from compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt index b090015f1fd..958a5cf9a2a 100644 --- a/compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun.kt +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt @@ -19,12 +19,7 @@ interface IBar { class Test1() : IBar { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun qux(ss: IC): IC = IC(ss.s) @@ -43,12 +38,7 @@ class Test1() : IBar { class Test2 : IBar { - suspend fun foo(value: IC): IC { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: IC): IC = value suspend fun qux(s: String): IC = IC(s) @@ -65,12 +55,7 @@ class Test2 : IBar { } class Test3 : IBar { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value override suspend fun bar(): IC { return foo(IC("OK")) diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any.kt similarity index 73% rename from compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any.kt index a8a041fb493..a9d7dc57e6a 100644 --- a/compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any.kt +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any.kt @@ -19,12 +19,7 @@ interface IBar { class Test1() : IBar { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun qux(ss: IC): IC = IC(ss.s) @@ -43,12 +38,7 @@ class Test1() : IBar { class Test2 : IBar { - suspend fun foo(value: IC): IC { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: IC): IC = value suspend fun qux(s: String): IC = IC(s) @@ -65,12 +55,7 @@ class Test2 : IBar { } class Test3 : IBar { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value override suspend fun bar(): IC { return foo(IC("OK")) diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_itf.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_itf.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_itf.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_itf.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_this.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_this.kt similarity index 100% rename from compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_this.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_this.kt diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Int.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Int.kt similarity index 75% rename from compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Int.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Int.kt index e3df0c7a3fb..29abe545919 100644 --- a/compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Int.kt +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Int.kt @@ -19,12 +19,7 @@ interface IBar { class Test1() : IBar { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value suspend fun qux(ss: IC): IC = IC(ss.s) @@ -43,12 +38,7 @@ class Test1() : IBar { class Test2 : IBar { - suspend fun foo(value: IC): IC { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: IC): IC = value suspend fun qux(s: Int): IC = IC(s) @@ -65,12 +55,7 @@ class Test2 : IBar { } class Test3 : IBar { - suspend fun foo(value: T): T { - return suspendCoroutineUninterceptedOrReturn { - it.resume(value) - COROUTINE_SUSPENDED - } - } + suspend fun foo(value: T): T = value override suspend fun bar(): IC { return foo(IC(42)) diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/direct/returnResult.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/returnResult.kt new file mode 100644 index 00000000000..1c93589ac62 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/returnResult.kt @@ -0,0 +1,26 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// IGNORE_BACKEND: JVM_IR +// IGNORE_BACKEND_FIR: JVM_IR + +import helpers.* +import kotlin.coroutines.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("RESULT_CLASS_IN_RETURN_TYPE") +suspend fun signInFlowStepFirst(): Result = try { + Result.success("OK") +} catch (e: Exception) { + Result.failure(e) +} + +fun box(): String { + builder { + val res: Result = signInFlowStepFirst() + if (res.getOrThrow() != "OK") error("FAIL") + } + return "OK" +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReferenceResume.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendFunctionReference.kt similarity index 95% rename from compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReferenceResume.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendFunctionReference.kt index e122d0725f7..95aba9813bf 100644 --- a/compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReferenceResume.kt +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendFunctionReference.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR_ES6 // WITH_RUNTIME // WITH_COROUTINES diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendLambda.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendLambda.kt new file mode 100644 index 00000000000..aa15eebcfa6 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendLambda.kt @@ -0,0 +1,26 @@ +// IGNORE_BACKEND: JS_IR_ES6 +// 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" + var c: Continuation? = null + builder { + res = useR(call { suspendCoroutine { c = it } }) + } + c?.resume(R("OK")) + return res +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt new file mode 100644 index 00000000000..1ad31eb48bc --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt @@ -0,0 +1,91 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: String) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class Test1() { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + suspend fun bar(): IC { + return foo(qux(quz(suspendMe()))) + } + + suspend fun test() = bar().s +} + + +class Test2 { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: String): IC = IC(s) + + suspend fun quz(): String = suspendMe() + + suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test() = bar().s +} + +class Test3 { + suspend fun foo(value: T): T = value + + suspend fun bar(): IC { + return foo(suspendMe()) + } + + suspend fun test() = bar().s +} + +fun box(): String { + + var result = "FAIL" + builder { + result = Test1().test() + } + c?.resume(IC("OK")) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + result = Test2().test() + } + c?.resume("OK") + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + result = Test3().test() + } + c?.resume(IC("OK")) + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Any.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Any.kt new file mode 100644 index 00000000000..e6af827e69b --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Any.kt @@ -0,0 +1,91 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Any) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class Test1() { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + suspend fun bar(): IC { + return foo(qux(quz(suspendMe()))) + } + + suspend fun test(): Any = bar().s +} + + +class Test2 { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: String): IC = IC(s) + + suspend fun quz(): String = suspendMe() + + suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test() = bar().s +} + +class Test3 { + suspend fun foo(value: T) = value + + suspend fun bar(): IC { + return foo(suspendMe()) + } + + suspend fun test() = bar().s +} + +fun box(): String { + + var result: Any = "FAIL" + builder { + result = Test1().test() + } + c?.resume(IC("OK")) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + result = Test2().test() + } + c?.resume("OK") + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + result = Test3().test() + } + c?.resume(IC("OK")) + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineAny.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineAny.kt new file mode 100644 index 00000000000..91f01db2062 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineAny.kt @@ -0,0 +1,94 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class I0(val x: Any) + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: I0) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class Test1() { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + suspend fun bar(): IC { + return foo(qux(quz(IC(suspendMe())))) + } + + suspend fun test() = bar().s.x +} + + +class Test2 { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: String): IC = IC(I0(s)) + + suspend fun quz(): String = suspendMe() + + suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test() = bar().s.x +} + +class Test3 { + suspend fun foo(value: T): T = value + + suspend fun bar(): IC { + return foo(IC(suspendMe())) + } + + suspend fun test() = bar().s.x +} + +fun box(): String { + + var result: Any = "FAIL" + builder { + result = Test1().test() + } + c?.resume(I0("OK")) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + result = Test2().test() + } + c?.resume("OK") + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + result = Test3().test() + } + c?.resume(I0("OK")) + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineInt.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineInt.kt new file mode 100644 index 00000000000..ed9f7aa6bf4 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineInt.kt @@ -0,0 +1,97 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class I0(val x: Int) + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: I0) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class Test1() { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + suspend fun bar(): IC { + return foo(qux(quz(IC(suspendMe())))) + } + + suspend fun test() = bar().s.x +} + + +class Test2 { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: Int): IC = IC(I0(s)) + + suspend fun quz() = suspendMe() + + suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test() = bar().s.x +} + +class Test3 { + suspend fun foo(value: T): T = value + + suspend fun bar(): IC { + return foo(IC(suspendMe())) + } + + suspend fun test() = bar().s.x +} + +fun Int.toBoxResult() = + if (this == 42) "OK" else toString() + +fun box(): String { + + var result: Any = "FAIL" + builder { + result = Test1().test().toBoxResult() + } + c?.resume(I0(42)) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + result = Test2().test().toBoxResult() + } + c?.resume(42) + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + result = Test3().test().toBoxResult() + } + c?.resume(I0(42)) + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Int.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Int.kt new file mode 100644 index 00000000000..c1b4263c404 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Int.kt @@ -0,0 +1,94 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Int) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class Test1() { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + suspend fun bar(): IC { + return foo(qux(quz(suspendMe()))) + } + + suspend fun test() = bar().s +} + + +class Test2 { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: Int): IC = IC(s) + + suspend fun quz(): Int = suspendMe() + + suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test() = bar().s +} + +class Test3 { + suspend fun foo(value: T): T = value + + suspend fun bar(): IC { + return foo(suspendMe()) + } + + suspend fun test() = bar().s +} + +fun Int.toBoxResult() = + if (this == 42) "OK" else toString() + +fun box(): String { + + var result: String = "FAIL" + builder { + result = Test1().test().toBoxResult() + } + c?.resume(IC(42)) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + result = Test2().test().toBoxResult() + } + c?.resume(42) + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + result = Test3().test().toBoxResult() + } + c?.resume(IC(42)) + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Long.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Long.kt new file mode 100644 index 00000000000..43e9c5b1c43 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Long.kt @@ -0,0 +1,94 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Long) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class Test1() { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + suspend fun bar(): IC { + return foo(qux(quz(suspendMe()))) + } + + suspend fun test() = bar().s +} + + +class Test2 { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: Long): IC = IC(s) + + suspend fun quz() = suspendMe() + + suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test() = bar().s +} + +class Test3 { + suspend fun foo(value: T): T = value + + suspend fun bar(): IC { + return foo(suspendMe()) + } + + suspend fun test() = bar().s +} + +fun Long.toBoxResult() = + if (this == 42L) "OK" else toString() + +fun box(): String { + + var result: String = "FAIL" + builder { + result = Test1().test().toBoxResult() + } + c?.resume(IC(42L)) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + result = Test2().test().toBoxResult() + } + c?.resume(42L) + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + result = Test3().test().toBoxResult() + } + c?.resume(IC(42L)) + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_NAny.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_NAny.kt new file mode 100644 index 00000000000..e992bc12dfb --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_NAny.kt @@ -0,0 +1,91 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Any?) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class Test1() { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + suspend fun bar(): IC { + return foo(qux(quz(suspendMe()))) + } + + suspend fun test() = bar().s +} + + +class Test2 { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: String): IC = IC(s) + + suspend fun quz(): String = suspendMe() + + suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test() = bar().s +} + +class Test3 { + suspend fun foo(value: T): T = value + + suspend fun bar(): IC { + return foo(suspendMe()) + } + + suspend fun test() = bar().s +} + +fun box(): String { + + var result: Any? = "FAIL" + builder { + result = Test1().test() + } + c?.resume(IC("OK")) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + result = Test2().test() + } + c?.resume("OK") + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + result = Test3().test() + } + c?.resume(IC("OK")) + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_nonLocalReturn.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_nonLocalReturn.kt new file mode 100644 index 00000000000..c823ff852d4 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_nonLocalReturn.kt @@ -0,0 +1,97 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: String) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class Test1() { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + suspend fun bar(): IC { + run { + return foo(qux(quz(suspendMe()))) + } + } + + suspend fun test() = bar().s +} + + +class Test2 { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: String): IC = IC(s) + + suspend fun quz(): String = suspendMe() + + suspend fun bar(): IC { + run { + return foo(qux(quz())) + } + } + + suspend fun test() = bar().s +} + +class Test3 { + suspend fun foo(value: T): T = value + + suspend fun bar(): IC { + run { + return foo(suspendMe()) + } + } + + suspend fun test() = bar().s +} + +fun box(): String { + + var result = "FAIL" + builder { + result = Test1().test() + } + c?.resume(IC("OK")) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + result = Test2().test() + } + c?.resume("OK") + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + result = Test3().test() + } + c?.resume(IC("OK")) + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_suspendFunType.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_suspendFunType.kt new file mode 100644 index 00000000000..ad47d13e527 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_suspendFunType.kt @@ -0,0 +1,51 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: String) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +fun suspendFunId(block: suspend () -> IC) = block + +class Test1() { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + suspend fun bar(): IC { + return suspendFunId { foo(qux(quz(suspendMe()))) }() + } + + suspend fun test() = bar().s +} + +fun box(): String { + + var result = "FAIL" + builder { + result = Test1().test() + } + c?.resume(IC("OK")) + + if (result != "OK") return "FAIL 1 $result" + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationCrossinline.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationCrossinline.kt new file mode 100644 index 00000000000..ea0e6e015a3 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationCrossinline.kt @@ -0,0 +1,54 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class Result(val a: Any?) { + fun getOrThrow(): T = a as T +} + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +abstract class ResultReceiver { + abstract suspend fun receive(result: Result) +} + +inline fun ResultReceiver(crossinline f: (Result) -> Unit): ResultReceiver = + object : ResultReceiver() { + override suspend fun receive(result: Result) { + f(result) + } + } + +fun test() { + var invoked = false + val receiver = ResultReceiver { result -> + val intResult = result.getOrThrow() + invoked = true + } + + builder { + receiver.receive(Result(suspendMe())) + } + c?.resume("42") + if (!invoked) { + throw RuntimeException("Fail") + } +} + +fun box(): String { + test() + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationNonInline.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationNonInline.kt new file mode 100644 index 00000000000..4361ea7d5de --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationNonInline.kt @@ -0,0 +1,54 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class Result(val a: Any?) { + fun getOrThrow(): T = a as T +} + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +abstract class ResultReceiver { + abstract suspend fun receive(result: Result) +} + +fun ResultReceiver(f: (Result) -> Unit): ResultReceiver = + object : ResultReceiver() { + override suspend fun receive(result: Result) { + f(result) + } + } + +fun test() { + var invoked = false + val receiver = ResultReceiver { result -> + val intResult = result.getOrThrow() + invoked = true + } + + builder { + receiver.receive(Result(suspendMe())) + } + c?.resume(42) + if (!invoked) { + throw RuntimeException("Fail") + } +} + +fun box(): String { + test() + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun.kt new file mode 100644 index 00000000000..ef7070eb019 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun.kt @@ -0,0 +1,53 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: String) + +interface IBar { + suspend fun bar(): Any +} + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class Test() : IBar { + + override suspend fun bar(): IC = suspendMe() + + suspend fun test1(): String { + val b: IBar = this + return (b.bar() as IC).s + } + + suspend fun test2(): String = bar().s +} + +fun box(): String { + var result = "FAIL 1" + builder { + result = Test().test1() + } + c?.resume(IC("OK")) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2 " + builder { + result = Test().test2() + } + c?.resume(IC("OK")) + if (result != "OK") return "FAIL 2 $result" + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass.kt new file mode 100644 index 00000000000..bc4732f83b9 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass.kt @@ -0,0 +1,55 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: String) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC? +} + +class Test() : IBar { + + override suspend fun bar(): IC = suspendMe() + + suspend fun test1(): String { + val b: IBar = this + return b.bar()!!.s + } + + suspend fun test2(): String { + return bar().s + } +} + +fun box(): String { + var result = "FAIL" + builder { + result = Test().test1() + } + c?.resume(IC("OK")) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + builder { + result = Test().test2() + } + c?.resume(IC("OK")) + if (result != "OK") return "FAIL 2 $result" + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt new file mode 100644 index 00000000000..40c943d344d --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt @@ -0,0 +1,54 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Any) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC? +} + +class Test() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test1(): String { + val b: IBar = this + return b.bar()!!.s as String + } + + suspend fun test2(): String { + return bar()!!.s as String + } +} + +fun box(): String { + var result = "FAIL" + builder { + result = Test().test1() + } + c?.resume(IC("OK")) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + builder { + result = Test().test2() + } + c?.resume(IC("OK")) + if (result != "OK") return "FAIL 2 $result" + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt new file mode 100644 index 00000000000..6d0234e82a6 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt @@ -0,0 +1,57 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Int) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC? +} + +fun Int.toResultString() = + if (this == 42) "OK" else "!!! $this" + +class Test() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test1(): String { + val b: IBar = this + return b.bar()!!.s.toResultString() + } + + suspend fun test2(): String { + return bar()!!.s.toResultString() + } +} + +fun box(): String { + var result = "FAIL" + builder { + result = Test().test1() + } + c?.resume(IC(42)) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + builder { + result = Test().test2() + } + c?.resume(IC(42)) + if (result != "OK") return "FAIL 2 $result" + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt new file mode 100644 index 00000000000..33e154c5e82 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt @@ -0,0 +1,54 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// IGNORE_BACKEND: JS_IR + +import helpers.* +import kotlin.coroutines.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Any?) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC? +} + +class Test() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test1(): String { + val b: IBar = this + return b.bar()!!.s as String + } + + suspend fun test2(): String = bar().s as String +} + + +fun box(): String { + var result = "FAIL" + builder { + result = Test().test1() + } + c?.resume(IC("OK")) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + builder { + result = Test().test2() + } + c?.resume(IC("OK")) + if (result != "OK") return "FAIL 2 $result" + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt new file mode 100644 index 00000000000..3bbfad436fa --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt @@ -0,0 +1,60 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Any?) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC? +} + +class Test1() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test(): Any? { + val b: IBar = this + return b.bar()!!.s + } +} + +class Test2() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test(): IC { + val b: IBar = this + return b.bar()!! + } +} + + +fun box(): String { + var result: Any? = "FAIL 1" + builder { + result = Test1().test() + } + c?.resume(IC(null)) + if (result != null) return "FAIL 1 $result" + + result = "FAIL 2" + builder { + result = Test2().test() + } + c?.resume(IC(null)) + if (result != IC(null)) return "FAIL 2 $result" + + return "OK" +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt new file mode 100644 index 00000000000..ce8f54f12fb --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt @@ -0,0 +1,57 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Int?) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC? +} + +fun Int?.toResultString() = + if (this == 42) "OK" else "!!! $this" + +class Test() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test1(): String { + val b: IBar = this + return b.bar()!!.s.toResultString() + } + + suspend fun test2(): String { + return bar()!!.s.toResultString() + } +} + +fun box(): String { + var result = "FAIL" + builder { + result = Test().test1() + } + c?.resume(IC(42)) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + builder { + result = Test().test2() + } + c?.resume(IC(42)) + if (result != "OK") return "FAIL 2 $result" + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt new file mode 100644 index 00000000000..4078febb265 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt @@ -0,0 +1,57 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Int?) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC? +} + +fun Int?.toResultString() = + if (this == null) "OK" else "!!! $this" + +class Test() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test1(): String { + val b: IBar = this + return b.bar()!!.s.toResultString() + } + + suspend fun test2(): String { + return bar()!!.s.toResultString() + } +} + +fun box(): String { + var result = "FAIL" + builder { + result = Test().test1() + } + c?.resume(IC(null)) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + builder { + result = Test().test2() + } + c?.resume(IC(null)) + if (result != "OK") return "FAIL 2 $result" + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Any.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Any.kt new file mode 100644 index 00000000000..bce43469c1c --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Any.kt @@ -0,0 +1,55 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// IGNORE_BACKEND: JS_IR + +import helpers.* +import kotlin.coroutines.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Any) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): Any +} + +class Test() : IBar { + + override suspend fun bar(): IC = suspendMe() + + suspend fun test1(): String { + val b: IBar = this + return (b.bar() as IC).s as String + } + + suspend fun test2(): String = bar().s as String +} + + +fun box(): String { + var result = "FAIL 1" + builder { + result = Test().test1() + } + c?.resume(IC("OK")) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2 " + builder { + result = Test().test2() + } + c?.resume(IC("OK")) + if (result != "OK") return "FAIL 2 $result" + + return result +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Int.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Int.kt new file mode 100644 index 00000000000..b2d5a0e9a47 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Int.kt @@ -0,0 +1,58 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Int) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): Any +} + +class Test() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test1(): Int { + val b: IBar = this + return (b.bar() as IC).s + } + + suspend fun test2(): Int { + val b: IBar = this + return (b.bar() as IC).s + } +} + +fun Int.toBoxResult() = + if (this == 42) "OK" else toString() + +fun box(): String { + var result: String = "FAIL" + builder { + result = Test().test1().toBoxResult() + } + c?.resume(IC(42)) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + builder { + result = Test().test2().toBoxResult() + } + c?.resume(IC(42)) + if (result != "OK") return "FAIL 2 $result" + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun.kt new file mode 100644 index 00000000000..78f883dfdc6 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun.kt @@ -0,0 +1,36 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +inline class IC(val s: String) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface Base { + suspend fun generic(): T +} + +class Derived : Base { + override suspend fun generic(): IC = suspendMe() +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +fun box(): String { + var res: String? = null + builder { + val base: Base<*> = Derived() + res = (base.generic() as IC).s + } + c?.resume(IC("OK")) + return res!! +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any.kt new file mode 100644 index 00000000000..5b9ec8604fc --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any.kt @@ -0,0 +1,37 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// IGNORE_BACKEND: JS_IR + +import helpers.* +import kotlin.coroutines.* + +inline class IC(val s: Any) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface Base { + suspend fun generic(): T +} + +class Derived : Base { + override suspend fun generic(): IC = suspendMe() +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +fun box(): String { + var res: String? = null + builder { + val base: Base<*> = Derived() + res = (base.generic() as IC).s as String + } + c?.resume(IC("OK")) + return res!! +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt new file mode 100644 index 00000000000..cde16bcd037 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt @@ -0,0 +1,36 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +inline class IC(val s: Any) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface Base { + suspend fun generic(): T +} + +class Derived : Base { + override suspend fun generic(): IC = suspendMe() +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +fun box(): String { + var res: String? = null + builder { + val base: Base<*> = Derived() + res = base.generic()!!.s as String + } + c?.resume(IC("OK")) + return res!! +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Int.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Int.kt new file mode 100644 index 00000000000..b02a63cef83 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Int.kt @@ -0,0 +1,39 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +inline class IC(val s: Int) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +fun Int.toResultString() = + if (this == 42) "OK" else "!! $this" + +interface Base { + suspend fun generic(): T +} + +class Derived : Base { + override suspend fun generic(): IC = suspendMe() +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +fun box(): String { + var res: String? = null + builder { + val base: Base<*> = Derived() + res = (base.generic() as IC).s.toResultString() + } + c?.resume(IC(42)) + return res!! +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny.kt new file mode 100644 index 00000000000..6799ee6be76 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny.kt @@ -0,0 +1,37 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// IGNORE_BACKEND: JS_IR + +import helpers.* +import kotlin.coroutines.* + +inline class IC(val s: Any?) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface Base { + suspend fun generic(): T +} + +class Derived : Base { + override suspend fun generic(): IC = suspendMe() +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +fun box(): String { + var res: String? = null + builder { + val base: Base<*> = Derived() + res = (base.generic() as IC).s as String + } + c?.resume(IC("OK")) + return res!! +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny_null.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny_null.kt new file mode 100644 index 00000000000..77cbfa96934 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny_null.kt @@ -0,0 +1,39 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +inline class IC(val s: Any?) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface Base { + suspend fun generic(): T +} + +class Derived : Base { + override suspend fun generic(): IC = suspendMe() +} + +fun Any?.toResultString(): String = + if (this == null) "OK" else "!! $this" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +fun box(): String { + var res: String? = null + builder { + val base: Base<*> = Derived() + res = (base.generic() as IC).s.toResultString() + } + c?.resume(IC(null)) + return res!! +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt.kt new file mode 100644 index 00000000000..9159a513e02 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt.kt @@ -0,0 +1,39 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +inline class IC(val s: Int?) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +fun Int?.toResultString() = + if (this == 42) "OK" else "!! $this" + +interface Base { + suspend fun generic(): T +} + +class Derived : Base { + override suspend fun generic(): IC = suspendMe() +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +fun box(): String { + var res: String? = null + builder { + val base: Base<*> = Derived() + res = (base.generic() as IC).s.toResultString() + } + c?.resume(IC(42)) + return res!! +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt_null.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt_null.kt new file mode 100644 index 00000000000..ae692ee750a --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt_null.kt @@ -0,0 +1,39 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +inline class IC(val s: Int?) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +fun Int?.toResultString() = + if (this == null) "OK" else "!! $this" + +interface Base { + suspend fun generic(): T +} + +class Derived : Base { + override suspend fun generic(): IC = suspendMe() +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +fun box(): String { + var res: String? = null + builder { + val base: Base<*> = Derived() + res = (base.generic() as IC).s.toResultString() + } + c?.resume(IC(null)) + return res!! +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt new file mode 100644 index 00000000000..2dc3da93548 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt @@ -0,0 +1,47 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: String) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface I { + suspend fun foo(s: String): IC +} + +class D: I { + override suspend fun foo(s: String): IC = suspendMe() +} + +class C(val d: I) : I by d + + +fun box(): String { + var result = "FAIL" + + val d = D() + + builder { + result = C(d).foo("IGNORE ME").s + } + c?.resume(IC("OK")) + + if (result != "OK") return "FAIL: $result" + + return result +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt new file mode 100644 index 00000000000..5d3d7c7dce6 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt @@ -0,0 +1,104 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: String) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC +} + +class Test1() : IBar { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + override suspend fun bar(): IC { + return foo(qux(quz(suspendMe()))) + } + + suspend fun test(): String { + val b: IBar = this + return b.bar().s + } +} + + +class Test2 : IBar { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: String): IC = IC(s) + + suspend fun quz(): String = suspendMe() + + override suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test(): String { + val b: IBar = this + return b.bar().s + } +} + +class Test3 : IBar { + suspend fun foo(value: T): T = value + + override suspend fun bar(): IC { + return foo(suspendMe()) + } + + suspend fun test(): String { + val b: IBar = this + return b.bar().s + } +} + +fun box(): String { + + var result = "FAIL" + builder { + result = Test1().test() + } + c?.resume(IC("OK")) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + result = Test2().test() + } + c?.resume("OK") + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + result = Test3().test() + } + c?.resume(IC("OK")) + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any.kt new file mode 100644 index 00000000000..bea9484893c --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any.kt @@ -0,0 +1,98 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Any) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC +} + +class Test1() : IBar { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + override suspend fun bar(): IC { + return foo(qux(quz(suspendMe()))) + } + + suspend fun test(): Any { + val b: IBar = this + return b.bar().s + } +} + + +class Test2 : IBar { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: String): IC = IC(s) + + suspend fun quz(): String = suspendMe() + + override suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test(): Any { + val b: IBar = this + return b.bar().s + } +} + +class Test3 : IBar { + suspend fun foo(value: T): T = value + + override suspend fun bar(): IC { + return foo(suspendMe()) + } + + suspend fun test(): Any { + val b: IBar = this + return b.bar().s + } +} + +fun box(): String { + var result: Any = "FAIL1" + builder { + result = Test1().test() + } + c?.resume(IC("OK")) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + builder { + result = Test2().test() + } + c?.resume("OK") + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + builder { + result = Test3().test() + } + c?.resume(IC("OK")) + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_itf.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_itf.kt new file mode 100644 index 00000000000..7d32fbda6fb --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_itf.kt @@ -0,0 +1,45 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Any) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC +} + +class Test0() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test(): Any { + val b: IBar = this + return b.bar().s + } +} + +fun box(): String { + var result: Any = "FAIL" + builder { + result = Test0().test() + } + c?.resume(IC("OK")) + if (result != "OK") return "FAIL 0 $result" + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_this.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_this.kt new file mode 100644 index 00000000000..98b8edd97bd --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_this.kt @@ -0,0 +1,44 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Any) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC +} + +class Test0() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test(): Any { + return bar().s + } +} + +fun box(): String { + var result: Any = "FAIL" + builder { + result = Test0().test() + } + c?.resume(IC("OK")) + if (result != "OK") return "FAIL 0 $result" + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Int.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Int.kt new file mode 100644 index 00000000000..8b193bc04ad --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Int.kt @@ -0,0 +1,107 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Int) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC +} + +class Test1() : IBar { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + override suspend fun bar(): IC { + return foo(qux(quz(suspendMe()))) + } + + suspend fun test(): Int { + val b: IBar = this + return b.bar().s + } +} + + +class Test2 : IBar { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: Int): IC = IC(s) + + suspend fun quz(): Int = suspendMe() + + override suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test(): Int { + val b: IBar = this + return b.bar().s + } +} + +class Test3 : IBar { + suspend fun foo(value: T): T = value + + override suspend fun bar(): IC { + return foo(suspendMe()) + } + + suspend fun test(): Int { + val b: IBar = this + return b.bar().s + } +} + +fun Int.toBoxResult() = + if (this == 42) "OK" else toString() + +fun box(): String { + + var result: String = "FAIL" + builder { + result = Test1().test().toBoxResult() + } + c?.resume(IC(42)) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + result = Test2().test().toBoxResult() + } + c?.resume(42) + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + result = Test3().test().toBoxResult() + } + c?.resume(IC(42)) + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/returnResult.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/returnResult.kt new file mode 100644 index 00000000000..aeb85f5a7cc --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/returnResult.kt @@ -0,0 +1,31 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// IGNORE_BACKEND: JVM_IR +// IGNORE_BACKEND_FIR: JVM_IR + +import helpers.* +import kotlin.coroutines.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +var continuation: Continuation? = null + +suspend fun suspendMe() = suspendCoroutine { continuation = it } + +@Suppress("RESULT_CLASS_IN_RETURN_TYPE") +suspend fun signInFlowStepFirst(): Result = try { + Result.success(suspendMe()) +} catch (e: Exception) { + Result.failure(e) +} + +fun box(): String { + builder { + val res: Result = signInFlowStepFirst() + if (res.getOrNull() != "OK") error("FAIL") + } + continuation!!.resume("OK") + return "OK" +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendFunctionReference.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendFunctionReference.kt new file mode 100644 index 00000000000..c3428e134be --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendFunctionReference.kt @@ -0,0 +1,32 @@ +// IGNORE_BACKEND: JS_IR_ES6 +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +inline class R(val x: Any) + +var result: String = "fail" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +suspend fun call(fn: suspend () -> T) = fn() + +fun useR(r: R) = if (r.x == "OK") "OK" else "fail: $r" + +var c: Continuation? = null + +suspend fun ok() = suspendCoroutine { c = it } + +fun box(): String { + builder { + useR(call(::ok)) + } + c?.resumeWithException(IllegalStateException("OK")) + return result +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendLambda.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendLambda.kt new file mode 100644 index 00000000000..83f1d233b08 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendLambda.kt @@ -0,0 +1,29 @@ +// IGNORE_BACKEND: JS_IR_ES6 +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +inline class R(val x: Any) + +var result: String = "fail" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +suspend fun call(fn: suspend () -> T) = fn() + +fun useR(r: R) = if (r.x == "OK") "OK" else "fail: $r" + +fun box(): String { + var c: Continuation? = null + builder { + useR(call { suspendCoroutine { c = it } }) + } + c?.resumeWithException(IllegalStateException("OK")) + return result +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt new file mode 100644 index 00000000000..a4f922a0065 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt @@ -0,0 +1,93 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: String) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class Test1() { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + suspend fun bar(): IC { + return foo(qux(quz(suspendMe()))) + } + + suspend fun test() = bar().s +} + + +class Test2 { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: String): IC = IC(s) + + suspend fun quz(): String = suspendMe() + + suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test() = bar().s +} + +class Test3 { + suspend fun foo(value: T): T = value + + suspend fun bar(): IC { + return foo(suspendMe()) + } + + suspend fun test() = bar().s +} + +fun box(): String { + builder { + Test1().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + Test2().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + Test3().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Any.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Any.kt new file mode 100644 index 00000000000..d73098fc7c7 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Any.kt @@ -0,0 +1,93 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Any) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class Test1() { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + suspend fun bar(): IC { + return foo(qux(quz(suspendMe()))) + } + + suspend fun test(): Any = bar().s +} + + +class Test2 { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: String): IC = IC(s) + + suspend fun quz(): String = suspendMe() + + suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test() = bar().s +} + +class Test3 { + suspend fun foo(value: T) = value + + suspend fun bar(): IC { + return foo(suspendMe()) + } + + suspend fun test() = bar().s +} + +fun box(): String { + builder { + Test1().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + Test2().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + Test3().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineAny.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineAny.kt new file mode 100644 index 00000000000..73b1acd71fa --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineAny.kt @@ -0,0 +1,96 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class I0(val x: Any) + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: I0) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class Test1() { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + suspend fun bar(): IC { + return foo(qux(quz(IC(suspendMe())))) + } + + suspend fun test() = bar().s.x +} + + +class Test2 { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: String): IC = IC(I0(s)) + + suspend fun quz(): String = suspendMe() + + suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test() = bar().s.x +} + +class Test3 { + suspend fun foo(value: T): T = value + + suspend fun bar(): IC { + return foo(IC(suspendMe())) + } + + suspend fun test() = bar().s.x +} + +fun box(): String { + builder { + Test1().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + Test2().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + Test3().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineInt.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineInt.kt new file mode 100644 index 00000000000..fc08508ad24 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineInt.kt @@ -0,0 +1,99 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class I0(val x: Int) + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: I0) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class Test1() { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + suspend fun bar(): IC { + return foo(qux(quz(IC(suspendMe())))) + } + + suspend fun test() = bar().s.x +} + + +class Test2 { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: Int): IC = IC(I0(s)) + + suspend fun quz() = suspendMe() + + suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test() = bar().s.x +} + +class Test3 { + suspend fun foo(value: T): T = value + + suspend fun bar(): IC { + return foo(IC(suspendMe())) + } + + suspend fun test() = bar().s.x +} + +fun Int.toBoxResult() = + if (this == 42) "OK" else toString() + +fun box(): String { + builder { + Test1().test().toBoxResult() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + Test2().test().toBoxResult() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + Test3().test().toBoxResult() + } + c?.resumeWithException(IllegalStateException("OK")) + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Int.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Int.kt new file mode 100644 index 00000000000..d0fadab5062 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Int.kt @@ -0,0 +1,96 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Int) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class Test1() { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + suspend fun bar(): IC { + return foo(qux(quz(suspendMe()))) + } + + suspend fun test() = bar().s +} + + +class Test2 { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: Int): IC = IC(s) + + suspend fun quz(): Int = suspendMe() + + suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test() = bar().s +} + +class Test3 { + suspend fun foo(value: T): T = value + + suspend fun bar(): IC { + return foo(suspendMe()) + } + + suspend fun test() = bar().s +} + +fun Int.toBoxResult() = + if (this == 42) "OK" else toString() + +fun box(): String { + builder { + Test1().test().toBoxResult() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + Test2().test().toBoxResult() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + Test3().test().toBoxResult() + } + c?.resumeWithException(IllegalStateException("OK")) + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Long.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Long.kt new file mode 100644 index 00000000000..c60a0815245 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Long.kt @@ -0,0 +1,96 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Long) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class Test1() { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + suspend fun bar(): IC { + return foo(qux(quz(suspendMe()))) + } + + suspend fun test() = bar().s +} + + +class Test2 { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: Long): IC = IC(s) + + suspend fun quz() = suspendMe() + + suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test() = bar().s +} + +class Test3 { + suspend fun foo(value: T): T = value + + suspend fun bar(): IC { + return foo(suspendMe()) + } + + suspend fun test() = bar().s +} + +fun Long.toBoxResult() = + if (this == 42L) "OK" else toString() + +fun box(): String { + builder { + Test1().test().toBoxResult() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + Test2().test().toBoxResult() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + Test3().test().toBoxResult() + } + c?.resumeWithException(IllegalStateException("OK")) + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_NAny.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_NAny.kt new file mode 100644 index 00000000000..8988ec5e51f --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_NAny.kt @@ -0,0 +1,93 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Any?) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class Test1() { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + suspend fun bar(): IC { + return foo(qux(quz(suspendMe()))) + } + + suspend fun test() = bar().s +} + + +class Test2 { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: String): IC = IC(s) + + suspend fun quz(): String = suspendMe() + + suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test() = bar().s +} + +class Test3 { + suspend fun foo(value: T): T = value + + suspend fun bar(): IC { + return foo(suspendMe()) + } + + suspend fun test() = bar().s +} + +fun box(): String { + builder { + Test1().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + Test2().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + Test3().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_nonLocalReturn.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_nonLocalReturn.kt new file mode 100644 index 00000000000..a3bd651fb30 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_nonLocalReturn.kt @@ -0,0 +1,99 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: String) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class Test1() { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + suspend fun bar(): IC { + run { + return foo(qux(quz(suspendMe()))) + } + } + + suspend fun test() = bar().s +} + + +class Test2 { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: String): IC = IC(s) + + suspend fun quz(): String = suspendMe() + + suspend fun bar(): IC { + run { + return foo(qux(quz())) + } + } + + suspend fun test() = bar().s +} + +class Test3 { + suspend fun foo(value: T): T = value + + suspend fun bar(): IC { + run { + return foo(suspendMe()) + } + } + + suspend fun test() = bar().s +} + +fun box(): String { + builder { + Test1().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + Test2().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + Test3().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_suspendFunType.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_suspendFunType.kt new file mode 100644 index 00000000000..b0ab0e65ff6 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_suspendFunType.kt @@ -0,0 +1,53 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: String) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +fun suspendFunId(block: suspend () -> IC) = block + +class Test1() { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + suspend fun bar(): IC { + return suspendFunId { foo(qux(quz(suspendMe()))) }() + } + + suspend fun test() = bar().s +} + +fun box(): String { + builder { + Test1().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 1 $result" + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationCrossinline.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationCrossinline.kt new file mode 100644 index 00000000000..8fb3abf1b0b --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationCrossinline.kt @@ -0,0 +1,58 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class Result(val a: Any?) { + fun getOrThrow(): T = a as T +} + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +abstract class ResultReceiver { + abstract suspend fun receive(result: Result) +} + +inline fun ResultReceiver(crossinline f: (Result) -> Unit): ResultReceiver = + object : ResultReceiver() { + override suspend fun receive(result: Result) { + f(result) + } + } + +fun test() { + var invoked = false + val receiver = ResultReceiver { result -> + invoked = true + result.getOrThrow() + } + + builder { + receiver.receive(Result(suspendMe())) + } + c?.resumeWithException(IllegalStateException("OK")) + if (invoked) { + throw RuntimeException("Fail") + } +} + +fun box(): String { + test() + return result +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationNonInline.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationNonInline.kt new file mode 100644 index 00000000000..efa22111697 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationNonInline.kt @@ -0,0 +1,58 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class Result(val a: Any?) { + fun getOrThrow(): T = a as T +} + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +abstract class ResultReceiver { + abstract suspend fun receive(result: Result) +} + +fun ResultReceiver(f: (Result) -> Unit): ResultReceiver = + object : ResultReceiver() { + override suspend fun receive(result: Result) { + f(result) + } + } + +fun test() { + var invoked = false + val receiver = ResultReceiver { result -> + invoked = true + result.getOrThrow() + } + + builder { + receiver.receive(Result(suspendMe())) + } + c?.resumeWithException(IllegalStateException("OK")) + if (invoked) { + throw RuntimeException("Fail") + } +} + +fun box(): String { + test() + return result +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun.kt new file mode 100644 index 00000000000..ff3d944de28 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun.kt @@ -0,0 +1,56 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: String) + +interface IBar { + suspend fun bar(): Any +} + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class Test() : IBar { + + override suspend fun bar(): IC = suspendMe() + + suspend fun test1(): String { + val b: IBar = this + return (b.bar() as IC).s + } + + suspend fun test2(): String = bar().s +} + +fun box(): String { + builder { + Test().test1() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2 " + builder { + Test().test2() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 2 $result" + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass.kt new file mode 100644 index 00000000000..6b05bfa75bc --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass.kt @@ -0,0 +1,58 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: String) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC? +} + +class Test() : IBar { + + override suspend fun bar(): IC = suspendMe() + + suspend fun test1(): String { + val b: IBar = this + return b.bar()!!.s + } + + suspend fun test2(): String { + return bar().s + } +} + +fun box(): String { + builder { + Test().test1() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + builder { + Test().test2() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 2 $result" + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt new file mode 100644 index 00000000000..d29c5e08cd4 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt @@ -0,0 +1,57 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Any) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC? +} + +class Test() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test1(): String { + val b: IBar = this + return b.bar()!!.s as String + } + + suspend fun test2(): String { + return bar()!!.s as String + } +} + +fun box(): String { + builder { + Test().test1() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + builder { + Test().test2() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 2 $result" + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt new file mode 100644 index 00000000000..1f6581bdb18 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt @@ -0,0 +1,60 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Int) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC? +} + +fun Int.toResultString() = + if (this == 42) "OK" else "!!! $this" + +class Test() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test1(): String { + val b: IBar = this + return b.bar()!!.s.toResultString() + } + + suspend fun test2(): String { + return bar()!!.s.toResultString() + } +} + +fun box(): String { + builder { + Test().test1() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + builder { + Test().test2() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 2 $result" + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt new file mode 100644 index 00000000000..88b513c5316 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt @@ -0,0 +1,57 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// IGNORE_BACKEND: JS_IR + +import helpers.* +import kotlin.coroutines.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Any?) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC? +} + +class Test() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test1(): String { + val b: IBar = this + return b.bar()!!.s as String + } + + suspend fun test2(): String = bar().s as String +} + + +fun box(): String { + builder { + Test().test1() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + builder { + Test().test2() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 2 $result" + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt new file mode 100644 index 00000000000..cfdb25fc3c2 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt @@ -0,0 +1,63 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Any?) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC? +} + +class Test1() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test(): Any? { + val b: IBar = this + return b.bar()!!.s + } +} + +class Test2() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test(): IC { + val b: IBar = this + return b.bar()!! + } +} + + +fun box(): String { + builder { + Test1().test() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL 2" + builder { + Test2().test() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 2 $result" + + return "OK" +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt new file mode 100644 index 00000000000..50dbed298d1 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt @@ -0,0 +1,60 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Int?) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC? +} + +fun Int?.toResultString() = + if (this == 42) "OK" else "!!! $this" + +class Test() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test1(): String { + val b: IBar = this + return b.bar()!!.s.toResultString() + } + + suspend fun test2(): String { + return bar()!!.s.toResultString() + } +} + +fun box(): String { + builder { + Test().test1() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + builder { + Test().test2() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 2 $result" + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Any.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Any.kt new file mode 100644 index 00000000000..073932406f9 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Any.kt @@ -0,0 +1,58 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// IGNORE_BACKEND: JS_IR + +import helpers.* +import kotlin.coroutines.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Any) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): Any +} + +class Test() : IBar { + + override suspend fun bar(): IC = suspendMe() + + suspend fun test1(): String { + val b: IBar = this + return (b.bar() as IC).s as String + } + + suspend fun test2(): String = bar().s as String +} + + +fun box(): String { + builder { + Test().test1() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2 " + builder { + Test().test2() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 2 $result" + + return result +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Int.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Int.kt new file mode 100644 index 00000000000..0871f4a6a97 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Int.kt @@ -0,0 +1,61 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Int) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): Any +} + +class Test() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test1(): Int { + val b: IBar = this + return (b.bar() as IC).s + } + + suspend fun test2(): Int { + val b: IBar = this + return (b.bar() as IC).s + } +} + +fun Int.toBoxResult() = + if (this == 42) "OK" else toString() + +fun box(): String { + builder { + Test().test1().toBoxResult() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + builder { + Test().test2().toBoxResult() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 2 $result" + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun.kt new file mode 100644 index 00000000000..203f8d4e8f8 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun.kt @@ -0,0 +1,39 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +var result = "FAIL" + +inline class IC(val s: String) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface Base { + suspend fun generic(): T +} + +class Derived : Base { + override suspend fun generic(): IC = suspendMe() +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +fun box(): String { + builder { + val base: Base<*> = Derived() + (base.generic() as IC).s + } + c?.resumeWithException(IllegalStateException("OK")) + return result +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any.kt new file mode 100644 index 00000000000..218f78f53f3 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any.kt @@ -0,0 +1,40 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// IGNORE_BACKEND: JS_IR + +import helpers.* +import kotlin.coroutines.* + +var result = "FAIL" + +inline class IC(val s: Any) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface Base { + suspend fun generic(): T +} + +class Derived : Base { + override suspend fun generic(): IC = suspendMe() +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +fun box(): String { + builder { + val base: Base<*> = Derived() + (base.generic() as IC).s as String + } + c?.resumeWithException(IllegalStateException("OK")) + return result +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt new file mode 100644 index 00000000000..9373000bef2 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt @@ -0,0 +1,39 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +var result = "FAIL" + +inline class IC(val s: Any) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface Base { + suspend fun generic(): T +} + +class Derived : Base { + override suspend fun generic(): IC = suspendMe() +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +fun box(): String { + builder { + val base: Base<*> = Derived() + base.generic()!!.s as String + } + c?.resumeWithException(IllegalStateException("OK")) + return result +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Int.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Int.kt new file mode 100644 index 00000000000..64df0ac7d5e --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Int.kt @@ -0,0 +1,42 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +var result = "FAIL" + +inline class IC(val s: Int) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +fun Int.toResultString() = + if (this == 42) "OK" else "!! $this" + +interface Base { + suspend fun generic(): T +} + +class Derived : Base { + override suspend fun generic(): IC = suspendMe() +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +fun box(): String { + builder { + val base: Base<*> = Derived() + (base.generic() as IC).s.toResultString() + } + c?.resumeWithException(IllegalStateException("OK")) + return result +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableAny.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableAny.kt new file mode 100644 index 00000000000..a43d5ef4660 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableAny.kt @@ -0,0 +1,40 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// IGNORE_BACKEND: JS_IR + +import helpers.* +import kotlin.coroutines.* + +var result = "FAIL" + +inline class IC(val s: Any?) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface Base { + suspend fun generic(): T +} + +class Derived : Base { + override suspend fun generic(): IC = suspendMe() +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +fun box(): String { + builder { + val base: Base<*> = Derived() + (base.generic() as IC).s as String + } + c?.resumeWithException(IllegalStateException("OK")) + return result +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableInt.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableInt.kt new file mode 100644 index 00000000000..597a005314f --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableInt.kt @@ -0,0 +1,42 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.* +import kotlin.coroutines.* + +var result = "FAIL" + +inline class IC(val s: Int?) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +fun Int?.toResultString() = + if (this == 42) "OK" else "!! $this" + +interface Base { + suspend fun generic(): T +} + +class Derived : Base { + override suspend fun generic(): IC = suspendMe() +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +fun box(): String { + builder { + val base: Base<*> = Derived() + (base.generic() as IC).s.toResultString() + } + c?.resumeWithException(IllegalStateException("OK")) + return result +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt new file mode 100644 index 00000000000..e9a9f202754 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt @@ -0,0 +1,49 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: String) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface I { + suspend fun foo(s: String): IC +} + +class D: I { + override suspend fun foo(s: String): IC = suspendMe() +} + +class C(val d: I) : I by d + + +fun box(): String { + val d = D() + + builder { + C(d).foo("IGNORE ME").s + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL: $result" + + return result +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt new file mode 100644 index 00000000000..f0ea3de33d8 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt @@ -0,0 +1,106 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: String) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC +} + +class Test1() : IBar { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + override suspend fun bar(): IC { + return foo(qux(quz(suspendMe()))) + } + + suspend fun test(): String { + val b: IBar = this + return b.bar().s + } +} + + +class Test2 : IBar { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: String): IC = IC(s) + + suspend fun quz(): String = suspendMe() + + override suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test(): String { + val b: IBar = this + return b.bar().s + } +} + +class Test3 : IBar { + suspend fun foo(value: T): T = value + + override suspend fun bar(): IC { + return foo(suspendMe()) + } + + suspend fun test(): String { + val b: IBar = this + return b.bar().s + } +} + +fun box(): String { + builder { + Test1().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + Test2().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + Test3().test() + } + c?.resumeWithException(IllegalStateException("OK")) + + return result +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any.kt new file mode 100644 index 00000000000..fcfcb43a1e5 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any.kt @@ -0,0 +1,101 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Any) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC +} + +class Test1() : IBar { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + override suspend fun bar(): IC { + return foo(qux(quz(suspendMe()))) + } + + suspend fun test(): Any { + val b: IBar = this + return b.bar().s + } +} + + +class Test2 : IBar { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: String): IC = IC(s) + + suspend fun quz(): String = suspendMe() + + override suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test(): Any { + val b: IBar = this + return b.bar().s + } +} + +class Test3 : IBar { + suspend fun foo(value: T): T = value + + override suspend fun bar(): IC { + return foo(suspendMe()) + } + + suspend fun test(): Any { + val b: IBar = this + return b.bar().s + } +} + +fun box(): String { + builder { + Test1().test() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + builder { + Test2().test() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + builder { + Test3().test() + } + c?.resumeWithException(IllegalStateException("OK")) + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_itf.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_itf.kt new file mode 100644 index 00000000000..34423556600 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_itf.kt @@ -0,0 +1,48 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Any) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC +} + +class Test0() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test(): Any { + val b: IBar = this + return b.bar().s + } +} + +fun box(): String { + builder { + Test0().test() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 0 $result" + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_this.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_this.kt new file mode 100644 index 00000000000..f7c82953694 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_this.kt @@ -0,0 +1,47 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Any) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC +} + +class Test0() : IBar { + override suspend fun bar(): IC = suspendMe() + + suspend fun test(): Any { + return bar().s + } +} + +fun box(): String { + builder { + Test0().test() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 0 $result" + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Int.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Int.kt new file mode 100644 index 00000000000..21a42a432a3 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Int.kt @@ -0,0 +1,109 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// COMMON_COROUTINES_TEST + +import helpers.* +import COROUTINES_PACKAGE.* +import COROUTINES_PACKAGE.intrinsics.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +@Suppress("UNSUPPORTED_FEATURE") +inline class IC(val s: Int) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +interface IBar { + suspend fun bar(): IC +} + +class Test1() : IBar { + + suspend fun foo(value: T): T = value + + suspend fun qux(ss: IC): IC = IC(ss.s) + + suspend fun quz(t: T): T = t + + override suspend fun bar(): IC { + return foo(qux(quz(suspendMe()))) + } + + suspend fun test(): Int { + val b: IBar = this + return b.bar().s + } +} + + +class Test2 : IBar { + + suspend fun foo(value: IC): IC = value + + suspend fun qux(s: Int): IC = IC(s) + + suspend fun quz(): Int = suspendMe() + + override suspend fun bar(): IC { + return foo(qux(quz())) + } + + suspend fun test(): Int { + val b: IBar = this + return b.bar().s + } +} + +class Test3 : IBar { + suspend fun foo(value: T): T = value + + override suspend fun bar(): IC { + return foo(suspendMe()) + } + + suspend fun test(): Int { + val b: IBar = this + return b.bar().s + } +} + +fun Int.toBoxResult() = + if (this == 42) "OK" else toString() + +fun box(): String { + builder { + Test1().test().toBoxResult() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL2" + + builder { + Test2().test().toBoxResult() + } + c?.resumeWithException(IllegalStateException("OK")) + + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + + builder { + Test3().test().toBoxResult() + } + c?.resumeWithException(IllegalStateException("OK")) + + return result as String +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/returnResult.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/returnResult.kt similarity index 65% rename from compiler/testData/codegen/box/coroutines/inlineClasses/returnResult.kt rename to compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/returnResult.kt index 335784c6248..7f8b97656c5 100644 --- a/compiler/testData/codegen/box/coroutines/inlineClasses/returnResult.kt +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/returnResult.kt @@ -1,6 +1,7 @@ // WITH_RUNTIME // WITH_COROUTINES // IGNORE_BACKEND: JVM_IR +// IGNORE_BACKEND_FIR: JVM_IR import helpers.* import kotlin.coroutines.* @@ -9,12 +10,12 @@ fun builder(c: suspend () -> Unit) { c.startCoroutine(EmptyContinuation) } -var continuation: Continuation? = null +var continuation: Continuation? = null -suspend fun suspendMe() = suspendCoroutine { continuation = it } +suspend fun suspendMe() = suspendCoroutine { continuation = it } @Suppress("RESULT_CLASS_IN_RETURN_TYPE") -suspend fun signInFlowStepFirst(): Result = try { +suspend fun signInFlowStepFirst(): Result = try { Result.success(suspendMe()) } catch (e: Exception) { Result.failure(e) @@ -22,7 +23,7 @@ suspend fun signInFlowStepFirst(): Result = try { fun box(): String { builder { - val res: Result = signInFlowStepFirst() + val res: Result = signInFlowStepFirst() if (res.exceptionOrNull()!!.message != "BOOYA") error("FAIL") } continuation!!.resumeWithException(Exception("BOOYA")) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index 022ec0b0483..4ff4825d335 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -8138,292 +8138,869 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } - private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { - KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath); - } - public void testAllFilesPresentInInlineClasses() throws Exception { 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("compiler/testData/codegen/box/coroutines/inlineClasses/direct") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Direct extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInDirect() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/direct"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendLambda.kt"); + } + + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationCrossinline.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationNonInline.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } + + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableAny.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") + public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableAny_null.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableInt.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") + public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableInt_null.kt"); + } + + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_this.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Int.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/returnResult.kt"); + } } - @TestMetadata("boxReturnValueOfSuspendFunctionReferenceResume.kt") - public void testBoxReturnValueOfSuspendFunctionReferenceResume() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReferenceResume.kt"); + @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resume") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Resume extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInResume() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resume"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendLambda.kt"); + } + + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationCrossinline.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationNonInline.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } + + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") + public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny_null.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") + public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt_null.kt"); + } + + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_this.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Int.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/returnResult.kt"); + } } - @TestMetadata("boxReturnValueOfSuspendLambda.kt") - public void testBoxReturnValueOfSuspendLambda() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendLambda.kt"); - } + @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ResumeWithException extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } - @TestMetadata("boxUnboxInsideCoroutine.kt") - public void testBoxUnboxInsideCoroutine_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt", "kotlin.coroutines.experimental"); - } + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath); + } - @TestMetadata("boxUnboxInsideCoroutine.kt") - public void testBoxUnboxInsideCoroutine_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); - } + public void testAllFilesPresentInResumeWithException() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } - @TestMetadata("boxUnboxInsideCoroutine_Any.kt") - public void testBoxUnboxInsideCoroutine_Any_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendFunctionReference.kt"); + } - @TestMetadata("boxUnboxInsideCoroutine_Any.kt") - public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); - } + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendLambda.kt"); + } - @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") - public void testBoxUnboxInsideCoroutine_InlineAny_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") - public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") - public void testBoxUnboxInsideCoroutine_InlineInt_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") - public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_Int.kt") - public void testBoxUnboxInsideCoroutine_Int_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("boxUnboxInsideCoroutine_Int.kt") - public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_Long.kt") - public void testBoxUnboxInsideCoroutine_Long_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("boxUnboxInsideCoroutine_Long.kt") - public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") - public void testBoxUnboxInsideCoroutine_NAny_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") - public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") - public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") - public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") - public void testBoxUnboxInsideCoroutine_suspendFunType_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") - public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } - @TestMetadata("bridgeGenerationCrossinline.kt") - public void testBridgeGenerationCrossinline_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationCrossinline.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("bridgeGenerationCrossinline.kt") - public void testBridgeGenerationCrossinline_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } - @TestMetadata("bridgeGenerationNonInline.kt") - public void testBridgeGenerationNonInline_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationNonInline.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("bridgeGenerationNonInline.kt") - public void testBridgeGenerationNonInline_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationNonInline.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFun.kt") - public void testCovariantOverrideSuspendFun() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun.kt"); - } + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationCrossinline.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass.kt"); - } + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); - } + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationNonInline.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); - } + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); - } + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } - @TestMetadata("covariantOverrideSuspendFun_Any.kt") - public void testCovariantOverrideSuspendFun_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun_Any.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } - @TestMetadata("covariantOverrideSuspendFun_Int.kt") - public void testCovariantOverrideSuspendFun_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun_Int.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } - @TestMetadata("genericOverrideSuspendFun.kt") - public void testGenericOverrideSuspendFun() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Any.kt") - public void testGenericOverrideSuspendFun_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Any.kt"); - } + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Any.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") - public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); - } + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Int.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Int.kt") - public void testGenericOverrideSuspendFun_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Int.kt"); - } + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") - public void testGenericOverrideSuspendFun_NullableAny() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableAny.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") - public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableAny_null.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") - public void testGenericOverrideSuspendFun_NullableInt() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableInt.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Int.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") - public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableInt_null.kt"); - } + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableAny.kt"); + } - @TestMetadata("interfaceDelegateWithInlineClass.kt") - public void testInterfaceDelegateWithInlineClass_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableInt.kt"); + } - @TestMetadata("interfaceDelegateWithInlineClass.kt") - public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); - } + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("overrideSuspendFun.kt") - public void testOverrideSuspendFun_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun.kt") - public void testOverrideSuspendFun_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("overrideSuspendFun_Any.kt") - public void testOverrideSuspendFun_Any_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any.kt") - public void testOverrideSuspendFun_Any_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("overrideSuspendFun_Any_itf.kt") - public void testOverrideSuspendFun_Any_itf_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any_itf.kt") - public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("overrideSuspendFun_Any_this.kt") - public void testOverrideSuspendFun_Any_this_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_this.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any_this.kt") - public void testOverrideSuspendFun_Any_this_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_this.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("overrideSuspendFun_Int.kt") - public void testOverrideSuspendFun_Int_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Int.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Int.kt") - public void testOverrideSuspendFun_Int_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Int.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Int.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("returnResult.kt") - public void testReturnResult() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/returnResult.kt"); + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/returnResult.kt"); + } } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 87cb15c1eca..7547d51c0c0 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -8138,292 +8138,869 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } - private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { - KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath); - } - public void testAllFilesPresentInInlineClasses() throws Exception { 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("compiler/testData/codegen/box/coroutines/inlineClasses/direct") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Direct extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInDirect() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/direct"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendLambda.kt"); + } + + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationCrossinline.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationNonInline.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } + + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableAny.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") + public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableAny_null.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableInt.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") + public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableInt_null.kt"); + } + + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_this.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Int.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/returnResult.kt"); + } } - @TestMetadata("boxReturnValueOfSuspendFunctionReferenceResume.kt") - public void testBoxReturnValueOfSuspendFunctionReferenceResume() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReferenceResume.kt"); + @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resume") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Resume extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInResume() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resume"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendLambda.kt"); + } + + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationCrossinline.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationNonInline.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } + + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") + public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny_null.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") + public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt_null.kt"); + } + + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_this.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Int.kt", "kotlin.coroutines.experimental"); + } + + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/returnResult.kt"); + } } - @TestMetadata("boxReturnValueOfSuspendLambda.kt") - public void testBoxReturnValueOfSuspendLambda() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendLambda.kt"); - } + @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ResumeWithException extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } - @TestMetadata("boxUnboxInsideCoroutine.kt") - public void testBoxUnboxInsideCoroutine_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt", "kotlin.coroutines.experimental"); - } + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath); + } - @TestMetadata("boxUnboxInsideCoroutine.kt") - public void testBoxUnboxInsideCoroutine_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); - } + public void testAllFilesPresentInResumeWithException() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } - @TestMetadata("boxUnboxInsideCoroutine_Any.kt") - public void testBoxUnboxInsideCoroutine_Any_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendFunctionReference.kt"); + } - @TestMetadata("boxUnboxInsideCoroutine_Any.kt") - public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); - } + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendLambda.kt"); + } - @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") - public void testBoxUnboxInsideCoroutine_InlineAny_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") - public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") - public void testBoxUnboxInsideCoroutine_InlineInt_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") - public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_Int.kt") - public void testBoxUnboxInsideCoroutine_Int_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("boxUnboxInsideCoroutine_Int.kt") - public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_Long.kt") - public void testBoxUnboxInsideCoroutine_Long_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("boxUnboxInsideCoroutine_Long.kt") - public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") - public void testBoxUnboxInsideCoroutine_NAny_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") - public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") - public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") - public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") - public void testBoxUnboxInsideCoroutine_suspendFunType_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") - public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } - @TestMetadata("bridgeGenerationCrossinline.kt") - public void testBridgeGenerationCrossinline_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationCrossinline.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("bridgeGenerationCrossinline.kt") - public void testBridgeGenerationCrossinline_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } - @TestMetadata("bridgeGenerationNonInline.kt") - public void testBridgeGenerationNonInline_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationNonInline.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("bridgeGenerationNonInline.kt") - public void testBridgeGenerationNonInline_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationNonInline.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFun.kt") - public void testCovariantOverrideSuspendFun() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun.kt"); - } + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationCrossinline.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass.kt"); - } + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); - } + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationNonInline.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); - } + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); - } + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } - @TestMetadata("covariantOverrideSuspendFun_Any.kt") - public void testCovariantOverrideSuspendFun_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun_Any.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } - @TestMetadata("covariantOverrideSuspendFun_Int.kt") - public void testCovariantOverrideSuspendFun_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun_Int.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } - @TestMetadata("genericOverrideSuspendFun.kt") - public void testGenericOverrideSuspendFun() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Any.kt") - public void testGenericOverrideSuspendFun_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Any.kt"); - } + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Any.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") - public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); - } + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Int.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Int.kt") - public void testGenericOverrideSuspendFun_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Int.kt"); - } + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") - public void testGenericOverrideSuspendFun_NullableAny() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableAny.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") - public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableAny_null.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") - public void testGenericOverrideSuspendFun_NullableInt() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableInt.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Int.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") - public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableInt_null.kt"); - } + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableAny.kt"); + } - @TestMetadata("interfaceDelegateWithInlineClass.kt") - public void testInterfaceDelegateWithInlineClass_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableInt.kt"); + } - @TestMetadata("interfaceDelegateWithInlineClass.kt") - public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); - } + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("overrideSuspendFun.kt") - public void testOverrideSuspendFun_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun.kt") - public void testOverrideSuspendFun_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("overrideSuspendFun_Any.kt") - public void testOverrideSuspendFun_Any_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any.kt") - public void testOverrideSuspendFun_Any_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("overrideSuspendFun_Any_itf.kt") - public void testOverrideSuspendFun_Any_itf_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any_itf.kt") - public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("overrideSuspendFun_Any_this.kt") - public void testOverrideSuspendFun_Any_this_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_this.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any_this.kt") - public void testOverrideSuspendFun_Any_this_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_this.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("overrideSuspendFun_Int.kt") - public void testOverrideSuspendFun_Int_1_2() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Int.kt", "kotlin.coroutines.experimental"); - } + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Int.kt") - public void testOverrideSuspendFun_Int_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Int.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_2() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Int.kt", "kotlin.coroutines.experimental"); + } - @TestMetadata("returnResult.kt") - public void testReturnResult() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/returnResult.kt"); + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/returnResult.kt"); + } } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 9a87e4980eb..70eb63bb641 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -7428,207 +7428,614 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); } - private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { - KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath); - } - public void testAllFilesPresentInInlineClasses() throws Exception { 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("compiler/testData/codegen/box/coroutines/inlineClasses/direct") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Direct extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInDirect() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/direct"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendLambda.kt"); + } + + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } + + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableAny.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") + public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableAny_null.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableInt.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") + public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableInt_null.kt"); + } + + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/returnResult.kt"); + } } - @TestMetadata("boxReturnValueOfSuspendFunctionReferenceResume.kt") - public void testBoxReturnValueOfSuspendFunctionReferenceResume() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReferenceResume.kt"); + @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resume") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Resume extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInResume() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resume"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendLambda.kt"); + } + + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } + + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") + public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny_null.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") + public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt_null.kt"); + } + + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/returnResult.kt"); + } } - @TestMetadata("boxReturnValueOfSuspendLambda.kt") - public void testBoxReturnValueOfSuspendLambda() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendLambda.kt"); - } + @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ResumeWithException extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } - @TestMetadata("boxUnboxInsideCoroutine.kt") - public void testBoxUnboxInsideCoroutine_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); - } + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath); + } - @TestMetadata("boxUnboxInsideCoroutine_Any.kt") - public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); - } + public void testAllFilesPresentInResumeWithException() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } - @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") - public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); - } + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendFunctionReference.kt"); + } - @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") - public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); - } + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendLambda.kt"); + } - @TestMetadata("boxUnboxInsideCoroutine_Int.kt") - public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_Long.kt") - public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") - public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") - public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") - public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } - @TestMetadata("bridgeGenerationCrossinline.kt") - public void testBridgeGenerationCrossinline_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } - @TestMetadata("bridgeGenerationNonInline.kt") - public void testBridgeGenerationNonInline_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationNonInline.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFun.kt") - public void testCovariantOverrideSuspendFun() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun.kt"); - } + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass.kt"); - } + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); - } + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); - } + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); - } + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } - @TestMetadata("covariantOverrideSuspendFun_Any.kt") - public void testCovariantOverrideSuspendFun_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun_Any.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } - @TestMetadata("covariantOverrideSuspendFun_Int.kt") - public void testCovariantOverrideSuspendFun_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun_Int.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } - @TestMetadata("genericOverrideSuspendFun.kt") - public void testGenericOverrideSuspendFun() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Any.kt") - public void testGenericOverrideSuspendFun_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Any.kt"); - } + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Any.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") - public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); - } + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Int.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Int.kt") - public void testGenericOverrideSuspendFun_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Int.kt"); - } + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") - public void testGenericOverrideSuspendFun_NullableAny() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableAny.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") - public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableAny_null.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") - public void testGenericOverrideSuspendFun_NullableInt() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableInt.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Int.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") - public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableInt_null.kt"); - } + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableAny.kt"); + } - @TestMetadata("interfaceDelegateWithInlineClass.kt") - public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); - } + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableInt.kt"); + } - @TestMetadata("overrideSuspendFun.kt") - public void testOverrideSuspendFun_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun.kt", "kotlin.coroutines"); - } + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any.kt") - public void testOverrideSuspendFun_Any_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any_itf.kt") - public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any_this.kt") - public void testOverrideSuspendFun_Any_this_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Int.kt") - public void testOverrideSuspendFun_Int_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Int.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } - @TestMetadata("returnResult.kt") - public void testReturnResult() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/returnResult.kt"); + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/returnResult.kt"); + } } } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java index 8616c9bc2cd..95be9e840cc 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java @@ -6248,207 +6248,614 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); } - private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { - KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS_IR_ES6, testDataFilePath); - } - public void testAllFilesPresentInInlineClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); } - @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") - public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReference.kt"); + @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/direct") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Direct extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInDirect() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/direct"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendLambda.kt"); + } + + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } + + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableAny.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") + public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableAny_null.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableInt.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") + public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableInt_null.kt"); + } + + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/returnResult.kt"); + } } - @TestMetadata("boxReturnValueOfSuspendFunctionReferenceResume.kt") - public void testBoxReturnValueOfSuspendFunctionReferenceResume() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReferenceResume.kt"); + @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resume") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Resume extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInResume() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resume"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendLambda.kt"); + } + + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } + + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") + public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny_null.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") + public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt_null.kt"); + } + + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/returnResult.kt"); + } } - @TestMetadata("boxReturnValueOfSuspendLambda.kt") - public void testBoxReturnValueOfSuspendLambda() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendLambda.kt"); - } + @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ResumeWithException extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } - @TestMetadata("boxUnboxInsideCoroutine.kt") - public void testBoxUnboxInsideCoroutine_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); - } + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS_IR_ES6, testDataFilePath); + } - @TestMetadata("boxUnboxInsideCoroutine_Any.kt") - public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); - } + public void testAllFilesPresentInResumeWithException() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } - @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") - public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); - } + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendFunctionReference.kt"); + } - @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") - public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); - } + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendLambda.kt"); + } - @TestMetadata("boxUnboxInsideCoroutine_Int.kt") - public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_Long.kt") - public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") - public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") - public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") - public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } - @TestMetadata("bridgeGenerationCrossinline.kt") - public void testBridgeGenerationCrossinline_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } - @TestMetadata("bridgeGenerationNonInline.kt") - public void testBridgeGenerationNonInline_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationNonInline.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFun.kt") - public void testCovariantOverrideSuspendFun() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun.kt"); - } + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass.kt"); - } + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); - } + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); - } + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); - } + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } - @TestMetadata("covariantOverrideSuspendFun_Any.kt") - public void testCovariantOverrideSuspendFun_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun_Any.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } - @TestMetadata("covariantOverrideSuspendFun_Int.kt") - public void testCovariantOverrideSuspendFun_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun_Int.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } - @TestMetadata("genericOverrideSuspendFun.kt") - public void testGenericOverrideSuspendFun() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Any.kt") - public void testGenericOverrideSuspendFun_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Any.kt"); - } + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Any.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") - public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); - } + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Int.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Int.kt") - public void testGenericOverrideSuspendFun_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Int.kt"); - } + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") - public void testGenericOverrideSuspendFun_NullableAny() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableAny.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") - public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableAny_null.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") - public void testGenericOverrideSuspendFun_NullableInt() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableInt.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Int.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") - public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableInt_null.kt"); - } + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableAny.kt"); + } - @TestMetadata("interfaceDelegateWithInlineClass.kt") - public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); - } + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableInt.kt"); + } - @TestMetadata("overrideSuspendFun.kt") - public void testOverrideSuspendFun_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun.kt", "kotlin.coroutines"); - } + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any.kt") - public void testOverrideSuspendFun_Any_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any_itf.kt") - public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any_this.kt") - public void testOverrideSuspendFun_Any_this_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Int.kt") - public void testOverrideSuspendFun_Int_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Int.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } - @TestMetadata("returnResult.kt") - public void testReturnResult() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/returnResult.kt"); + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/returnResult.kt"); + } } } 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 415621b5e31..64c49e15f79 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 @@ -6248,207 +6248,614 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); } - private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { - KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS_IR, testDataFilePath); - } - public void testAllFilesPresentInInlineClasses() throws Exception { 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("compiler/testData/codegen/box/coroutines/inlineClasses/direct") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Direct extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInDirect() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/direct"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendLambda.kt"); + } + + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } + + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableAny.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") + public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableAny_null.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableInt.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") + public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableInt_null.kt"); + } + + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/returnResult.kt"); + } } - @TestMetadata("boxReturnValueOfSuspendFunctionReferenceResume.kt") - public void testBoxReturnValueOfSuspendFunctionReferenceResume() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReferenceResume.kt"); + @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resume") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Resume extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInResume() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resume"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendLambda.kt"); + } + + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } + + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") + public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny_null.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") + public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt_null.kt"); + } + + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/returnResult.kt"); + } } - @TestMetadata("boxReturnValueOfSuspendLambda.kt") - public void testBoxReturnValueOfSuspendLambda() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendLambda.kt"); - } + @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ResumeWithException extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } - @TestMetadata("boxUnboxInsideCoroutine.kt") - public void testBoxUnboxInsideCoroutine_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); - } + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS_IR, testDataFilePath); + } - @TestMetadata("boxUnboxInsideCoroutine_Any.kt") - public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); - } + public void testAllFilesPresentInResumeWithException() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } - @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") - public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); - } + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendFunctionReference.kt"); + } - @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") - public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); - } + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendLambda.kt"); + } - @TestMetadata("boxUnboxInsideCoroutine_Int.kt") - public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_Long.kt") - public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") - public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") - public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") - public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } - @TestMetadata("bridgeGenerationCrossinline.kt") - public void testBridgeGenerationCrossinline_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } - @TestMetadata("bridgeGenerationNonInline.kt") - public void testBridgeGenerationNonInline_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationNonInline.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFun.kt") - public void testCovariantOverrideSuspendFun() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun.kt"); - } + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass.kt"); - } + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); - } + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); - } + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); - } + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } - @TestMetadata("covariantOverrideSuspendFun_Any.kt") - public void testCovariantOverrideSuspendFun_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun_Any.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } - @TestMetadata("covariantOverrideSuspendFun_Int.kt") - public void testCovariantOverrideSuspendFun_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun_Int.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } - @TestMetadata("genericOverrideSuspendFun.kt") - public void testGenericOverrideSuspendFun() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Any.kt") - public void testGenericOverrideSuspendFun_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Any.kt"); - } + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Any.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") - public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); - } + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Int.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Int.kt") - public void testGenericOverrideSuspendFun_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Int.kt"); - } + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") - public void testGenericOverrideSuspendFun_NullableAny() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableAny.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") - public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableAny_null.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") - public void testGenericOverrideSuspendFun_NullableInt() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableInt.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Int.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") - public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableInt_null.kt"); - } + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableAny.kt"); + } - @TestMetadata("interfaceDelegateWithInlineClass.kt") - public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); - } + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableInt.kt"); + } - @TestMetadata("overrideSuspendFun.kt") - public void testOverrideSuspendFun_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun.kt", "kotlin.coroutines"); - } + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any.kt") - public void testOverrideSuspendFun_Any_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any_itf.kt") - public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any_this.kt") - public void testOverrideSuspendFun_Any_this_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Int.kt") - public void testOverrideSuspendFun_Int_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Int.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } - @TestMetadata("returnResult.kt") - public void testReturnResult() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/returnResult.kt"); + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/returnResult.kt"); + } } } 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 3c1eed05c39..84caa8d8c60 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 @@ -6248,207 +6248,614 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); } - private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { - KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS, testDataFilePath); - } - public void testAllFilesPresentInInlineClasses() throws Exception { 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("compiler/testData/codegen/box/coroutines/inlineClasses/direct") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Direct extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInDirect() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/direct"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxReturnValueOfSuspendLambda.kt"); + } + + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } + + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableAny.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") + public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableAny_null.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableInt.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") + public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun_NullableInt_null.kt"); + } + + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/returnResult.kt"); + } } - @TestMetadata("boxReturnValueOfSuspendFunctionReferenceResume.kt") - public void testBoxReturnValueOfSuspendFunctionReferenceResume() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendFunctionReferenceResume.kt"); + @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resume") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Resume extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInResume() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resume"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendFunctionReference.kt"); + } + + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxReturnValueOfSuspendLambda.kt"); + } + + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } + + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } + + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } + + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } + + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_Int.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") + public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableAny_null.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt.kt"); + } + + @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") + public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun_NullableInt_null.kt"); + } + + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } + + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/returnResult.kt"); + } } - @TestMetadata("boxReturnValueOfSuspendLambda.kt") - public void testBoxReturnValueOfSuspendLambda() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/boxReturnValueOfSuspendLambda.kt"); - } + @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ResumeWithException extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } - @TestMetadata("boxUnboxInsideCoroutine.kt") - public void testBoxUnboxInsideCoroutine_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); - } + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS, testDataFilePath); + } - @TestMetadata("boxUnboxInsideCoroutine_Any.kt") - public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); - } + public void testAllFilesPresentInResumeWithException() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } - @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") - public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); - } + @TestMetadata("boxReturnValueOfSuspendFunctionReference.kt") + public void testBoxReturnValueOfSuspendFunctionReference() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendFunctionReference.kt"); + } - @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") - public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); - } + @TestMetadata("boxReturnValueOfSuspendLambda.kt") + public void testBoxReturnValueOfSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxReturnValueOfSuspendLambda.kt"); + } - @TestMetadata("boxUnboxInsideCoroutine_Int.kt") - public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine.kt") + public void testBoxUnboxInsideCoroutine_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_Long.kt") - public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Any.kt") + public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") - public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt") + public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") - public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt") + public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines"); + } - @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") - public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Int.kt") + public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines"); + } - @TestMetadata("bridgeGenerationCrossinline.kt") - public void testBridgeGenerationCrossinline_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_Long.kt") + public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines"); + } - @TestMetadata("bridgeGenerationNonInline.kt") - public void testBridgeGenerationNonInline_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationNonInline.kt", "kotlin.coroutines"); - } + @TestMetadata("boxUnboxInsideCoroutine_NAny.kt") + public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFun.kt") - public void testCovariantOverrideSuspendFun() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun.kt"); - } + @TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt") + public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass.kt"); - } + @TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt") + public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); - } + @TestMetadata("bridgeGenerationCrossinline.kt") + public void testBridgeGenerationCrossinline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationCrossinline.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); - } + @TestMetadata("bridgeGenerationNonInline.kt") + public void testBridgeGenerationNonInline_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/bridgeGenerationNonInline.kt", "kotlin.coroutines"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); - } + @TestMetadata("covariantOverrideSuspendFun.kt") + public void testCovariantOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Any.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Any.kt"); + } - @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt") - public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt_null.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_Int.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_Int.kt"); + } - @TestMetadata("covariantOverrideSuspendFun_Any.kt") - public void testCovariantOverrideSuspendFun_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun_Any.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny.kt"); + } - @TestMetadata("covariantOverrideSuspendFun_Int.kt") - public void testCovariantOverrideSuspendFun_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFun_Int.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt"); + } - @TestMetadata("genericOverrideSuspendFun.kt") - public void testGenericOverrideSuspendFun() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun.kt"); - } + @TestMetadata("covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt") + public void testCovariantOverrideSuspendFunWithNullableInlineClass_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFunWithNullableInlineClass_NullableInt.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Any.kt") - public void testGenericOverrideSuspendFun_Any() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Any.kt"); - } + @TestMetadata("covariantOverrideSuspendFun_Any.kt") + public void testCovariantOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Any.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") - public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); - } + @TestMetadata("covariantOverrideSuspendFun_Int.kt") + public void testCovariantOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Int.kt"); + } - @TestMetadata("genericOverrideSuspendFun_Int.kt") - public void testGenericOverrideSuspendFun_Int() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_Int.kt"); - } + @TestMetadata("genericOverrideSuspendFun.kt") + public void testGenericOverrideSuspendFun() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") - public void testGenericOverrideSuspendFun_NullableAny() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableAny.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Any.kt") + public void testGenericOverrideSuspendFun_Any() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableAny_null.kt") - public void testGenericOverrideSuspendFun_NullableAny_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableAny_null.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt") + public void testGenericOverrideSuspendFun_Any_NullableInlineClassUpperBound() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Any_NullableInlineClassUpperBound.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") - public void testGenericOverrideSuspendFun_NullableInt() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableInt.kt"); - } + @TestMetadata("genericOverrideSuspendFun_Int.kt") + public void testGenericOverrideSuspendFun_Int() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_Int.kt"); + } - @TestMetadata("genericOverrideSuspendFun_NullableInt_null.kt") - public void testGenericOverrideSuspendFun_NullableInt_null() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericOverrideSuspendFun_NullableInt_null.kt"); - } + @TestMetadata("genericOverrideSuspendFun_NullableAny.kt") + public void testGenericOverrideSuspendFun_NullableAny() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableAny.kt"); + } - @TestMetadata("interfaceDelegateWithInlineClass.kt") - public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); - } + @TestMetadata("genericOverrideSuspendFun_NullableInt.kt") + public void testGenericOverrideSuspendFun_NullableInt() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun_NullableInt.kt"); + } - @TestMetadata("overrideSuspendFun.kt") - public void testOverrideSuspendFun_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun.kt", "kotlin.coroutines"); - } + @TestMetadata("interfaceDelegateWithInlineClass.kt") + public void testInterfaceDelegateWithInlineClass_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any.kt") - public void testOverrideSuspendFun_Any_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun.kt") + public void testOverrideSuspendFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any_itf.kt") - public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any.kt") + public void testOverrideSuspendFun_Any_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Any_this.kt") - public void testOverrideSuspendFun_Any_this_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any_itf.kt") + public void testOverrideSuspendFun_Any_itf_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_itf.kt", "kotlin.coroutines"); + } - @TestMetadata("overrideSuspendFun_Int.kt") - public void testOverrideSuspendFun_Int_1_3() throws Exception { - runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/overrideSuspendFun_Int.kt", "kotlin.coroutines"); - } + @TestMetadata("overrideSuspendFun_Any_this.kt") + public void testOverrideSuspendFun_Any_this_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Any_this.kt", "kotlin.coroutines"); + } - @TestMetadata("returnResult.kt") - public void testReturnResult() throws Exception { - runTest("compiler/testData/codegen/box/coroutines/inlineClasses/returnResult.kt"); + @TestMetadata("overrideSuspendFun_Int.kt") + public void testOverrideSuspendFun_Int_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun_Int.kt", "kotlin.coroutines"); + } + + @TestMetadata("returnResult.kt") + public void testReturnResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/returnResult.kt"); + } } }