From 9ed5b8f870e8c326d5312ed67f90681604b83420 Mon Sep 17 00:00:00 2001 From: Ilmir Usmanov Date: Thu, 26 Nov 2020 06:38:31 +0100 Subject: [PATCH] IC & Coroutines: Do not box suspend operator fun invoke receiver if it is called using parens and not by calling 'invoke' method. Use underlying type when calling continuation constructor if suspend function is method inside inline class. #KT-43505 Fixed #KT-39437 Fixed --- .../kotlin/codegen/ExpressionCodegen.java | 19 ++--- .../SuspendFunctionGenerationStrategy.kt | 5 +- .../ir/FirBlackBoxCodegenTestGenerated.java | 15 ++++ .../inlineClasses/direct/invokeOperator.kt | 62 +++++++++++++++ .../inlineClasses/resume/invokeOperator.kt | 75 ++++++++++++++++++ .../resumeWithException/invokeOperator.kt | 78 +++++++++++++++++++ .../codegen/BlackBoxCodegenTestGenerated.java | 15 ++++ .../LightAnalysisModeTestGenerated.java | 15 ++++ .../ir/IrBlackBoxCodegenTestGenerated.java | 15 ++++ .../IrJsCodegenBoxES6TestGenerated.java | 15 ++++ .../IrJsCodegenBoxTestGenerated.java | 15 ++++ .../semantics/JsCodegenBoxTestGenerated.java | 15 ++++ 12 files changed, 331 insertions(+), 13 deletions(-) create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/direct/invokeOperator.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resume/invokeOperator.kt create mode 100644 compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/invokeOperator.kt diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java index fc6b458a0ad..67323b5949b 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java @@ -375,22 +375,17 @@ public class ExpressionCodegen extends KtVisitor impleme FunctionDescriptor functionDescriptor = (FunctionDescriptor) descriptor; if (!functionDescriptor.isSuspend()) return stackValue; + // When we call suspend operator fun invoke using parens, we cannot box receiver as return type inline class + if (resolvedCall instanceof VariableAsFunctionResolvedCall && + functionDescriptor.isOperator() && functionDescriptor.getName().getIdentifier().equals("invoke") + ) return stackValue; + KotlinType unboxedInlineClass = CoroutineCodegenUtilKt .originalReturnTypeOfSuspendFunctionReturningUnboxedInlineClass(functionDescriptor, typeMapper); StackValue stackValueToWrap = stackValue; - KotlinType originalKotlinType; - if (unboxedInlineClass != null) { - originalKotlinType = unboxedInlineClass; - } else { - originalKotlinType = stackValueToWrap.kotlinType; - } - Type originalType; - if (unboxedInlineClass != null) { - originalType = typeMapper.mapType(unboxedInlineClass); - } else { - originalType = stackValueToWrap.type; - } + KotlinType originalKotlinType = unboxedInlineClass != null ? unboxedInlineClass : stackValueToWrap.kotlinType; + Type originalType = unboxedInlineClass != null ? typeMapper.mapType(unboxedInlineClass) : stackValueToWrap.type; stackValue = new StackValue(originalType, originalKotlinType) { @Override diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/SuspendFunctionGenerationStrategy.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/SuspendFunctionGenerationStrategy.kt index e3cc008b3ec..e1976f8ecfd 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/SuspendFunctionGenerationStrategy.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/SuspendFunctionGenerationStrategy.kt @@ -21,6 +21,7 @@ import org.jetbrains.kotlin.descriptors.FunctionDescriptor import org.jetbrains.kotlin.psi.KtFunction import org.jetbrains.kotlin.psi.psiUtil.getElementTextWithContext import org.jetbrains.kotlin.resolve.inline.isEffectivelyInlineOnly +import org.jetbrains.kotlin.resolve.isInlineClass import org.jetbrains.kotlin.resolve.jvm.diagnostics.JvmDeclarationOrigin import org.jetbrains.kotlin.resolve.jvm.diagnostics.OtherOrigin import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodSignature @@ -92,7 +93,9 @@ class SuspendFunctionGenerationStrategy( sourceFile = declaration.containingKtFile.name, shouldPreserveClassInitialization = constructorCallNormalizationMode.shouldPreserveClassInitialization, needDispatchReceiver = originalSuspendDescriptor.dispatchReceiverParameter != null, - internalNameForDispatchReceiver = containingClassInternalNameOrNull(), + internalNameForDispatchReceiver = (originalSuspendDescriptor.containingDeclaration as? ClassDescriptor)?.let { + if (it.isInlineClass()) state.typeMapper.mapType(it).internalName else null + } ?: containingClassInternalNameOrNull(), languageVersionSettings = languageVersionSettings, disableTailCallOptimizationForFunctionReturningUnit = originalSuspendDescriptor.returnType?.isUnit() == true && originalSuspendDescriptor.overriddenDescriptors.isNotEmpty() && 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 377bd3a01ad..56275f3e074 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 @@ -7798,6 +7798,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt", "kotlin.coroutines"); @@ -8025,6 +8030,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt", "kotlin.coroutines"); @@ -8237,6 +8247,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt", "kotlin.coroutines"); diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/direct/invokeOperator.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/invokeOperator.kt new file mode 100644 index 00000000000..a46c4de0ff6 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/direct/invokeOperator.kt @@ -0,0 +1,62 @@ +// WITH_RUNTIME + +import kotlin.coroutines.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(Continuation(EmptyCoroutineContext) { + it.getOrThrow() + }) +} + +inline class IC(val a: Any?) + +class GetResult { + suspend operator fun invoke() = IC("OK") +} + +inline class IC1(val a: String) { + suspend operator fun invoke() = IC(a) +} + +fun box(): String { + var res = "FAIL 1" + builder { + val getResult = GetResult() + res = getResult().a as String + } + if (res != "OK") return "FAIL 1 $res" + + res = "FAIL 2" + builder { + val getResult = GetResult() + res = getResult.invoke().a as String + } + if (res != "OK") return "FAIL 2 $res" + + res = "FAIL 3" + builder { + res = GetResult()().a as String + } + if (res != "OK") return "FAIL 3 $res" + + res = "FAIL 4" + builder { + val getResult = IC1("OK") + res = getResult().a as String + } + if (res != "OK") return "FAIL 4 $res" + + res = "FAIL 5" + builder { + val getResult = IC1("OK") + res = getResult.invoke().a as String + } + if (res != "OK") return "FAIL 5 $res" + + res = "FAIL 6" + builder { + res = IC1("OK")().a as String + } + if (res != "OK") return "FAIL 6 $res" + return res +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resume/invokeOperator.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/invokeOperator.kt new file mode 100644 index 00000000000..4bc91db863b --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resume/invokeOperator.kt @@ -0,0 +1,75 @@ +// WITH_RUNTIME + +import kotlin.coroutines.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(Continuation(EmptyCoroutineContext) { + it.getOrThrow() + }) +} + +inline class IC(val a: Any?) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class GetResult { + suspend operator fun invoke(): IC = suspendMe() +} + +inline class IC1(val a: String) { + suspend operator fun invoke(): IC = suspendMe() +} + +fun box(): String { + var res = "FAIL 1" + builder { + val getResult = GetResult() + res = getResult().a as String + } + c?.resume(IC("OK")) + if (res != "OK") return "FAIL 1 $res" + + res = "FAIL 2" + builder { + val getResult = GetResult() + res = getResult.invoke().a as String + } + c?.resume(IC("OK")) + if (res != "OK") return "FAIL 2 $res" + + res = "FAIL 3" + builder { + res = GetResult()().a as String + } + c?.resume(IC("OK")) + if (res != "OK") return "FAIL 3 $res" + + res = "FAIL 4" + builder { + val getResult = IC1("OK") + res = getResult().a as String + } + c?.resume(IC("OK")) + if (res != "OK") return "FAIL 4 $res" + + res = "FAIL 5" + builder { + val getResult = IC1("OK") + res = getResult.invoke().a as String + } + c?.resume(IC("OK")) + if (res != "OK") return "FAIL 5 $res" + + res = "FAIL 6" + builder { + res = IC1("OK")().a as String + } + c?.resume(IC("OK")) + if (res != "OK") return "FAIL 6 $res" + return res +} diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/invokeOperator.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/invokeOperator.kt new file mode 100644 index 00000000000..85c933eacb1 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/invokeOperator.kt @@ -0,0 +1,78 @@ +// WITH_RUNTIME +// WITH_COROUTINES + +import kotlin.coroutines.* +import helpers.* + +var result = "FAIL" + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(handleExceptionContinuation { + result = it.message!! + }) +} + +inline class IC(val a: Any?) + +var c: Continuation? = null + +suspend fun suspendMe(): T = suspendCoroutine { + @Suppress("UNCHECKED_CAST") + c = it as Continuation +} + +class GetResult { + suspend operator fun invoke(): IC = suspendMe() +} + +inline class IC1(val a: String) { + suspend operator fun invoke(): IC = suspendMe() +} + +fun box(): String { + builder { + val getResult = GetResult() + getResult() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 1 $result" + + result = "FAIL 2" + builder { + val getResult = GetResult() + getResult.invoke() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 2 $result" + + result = "FAIL 3" + builder { + GetResult()() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 3 $result" + + result = "FAIL 4" + builder { + val getResult = IC1("OK") + getResult() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 4 $result" + + result = "FAIL 5" + builder { + val getResult = IC1("OK") + getResult.invoke() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 5 $result" + + result = "FAIL 6" + builder { + IC1("OK")() + } + c?.resumeWithException(IllegalStateException("OK")) + if (result != "OK") return "FAIL 6 $result" + return result +} diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index e2a78f11cdd..42f25c74327 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -8573,6 +8573,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_2() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt", "kotlin.coroutines.experimental"); @@ -8885,6 +8890,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_2() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt", "kotlin.coroutines.experimental"); @@ -9182,6 +9192,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_2() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt", "kotlin.coroutines.experimental"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index ac3160b8849..4444e915f13 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -8573,6 +8573,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_2() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt", "kotlin.coroutines.experimental"); @@ -8885,6 +8890,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_2() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt", "kotlin.coroutines.experimental"); @@ -9182,6 +9192,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_2() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt", "kotlin.coroutines.experimental"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index ac46df24efa..1e77305d909 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -7798,6 +7798,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt", "kotlin.coroutines"); @@ -8025,6 +8030,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt", "kotlin.coroutines"); @@ -8237,6 +8247,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt", "kotlin.coroutines"); 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 23e823f35f0..fc7bc2148a2 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 @@ -6553,6 +6553,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt", "kotlin.coroutines"); @@ -6780,6 +6785,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt", "kotlin.coroutines"); @@ -6992,6 +7002,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt", "kotlin.coroutines"); 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 9b5a4e5cfd8..e5d615e4de6 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 @@ -6553,6 +6553,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt", "kotlin.coroutines"); @@ -6780,6 +6785,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt", "kotlin.coroutines"); @@ -6992,6 +7002,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt", "kotlin.coroutines"); 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 05d23e91356..d9c97517bb6 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 @@ -6553,6 +6553,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/direct/overrideSuspendFun.kt", "kotlin.coroutines"); @@ -6780,6 +6785,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resume/overrideSuspendFun.kt", "kotlin.coroutines"); @@ -6992,6 +7002,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/interfaceDelegateWithInlineClass.kt", "kotlin.coroutines"); } + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/invokeOperator.kt"); + } + @TestMetadata("overrideSuspendFun.kt") public void testOverrideSuspendFun_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/overrideSuspendFun.kt", "kotlin.coroutines");