JVM_IR: box inline class values returned by suspend inline lambdas

The call site inside the inline function expects them to return a boxed
value, like FunctionN.invoke would.

 #KT-46915 Fixed
This commit is contained in:
pyos
2021-05-25 12:51:51 +02:00
committed by Ilmir Usmanov
parent 117fad2018
commit 33ddeffcfd
13 changed files with 164 additions and 2 deletions
@@ -3990,11 +3990,21 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/inlineClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@TestMetadata("returnBoxedFromLambda.kt")
public void testReturnBoxedFromLambda() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnBoxedFromLambda.kt");
}
@TestMetadata("returnUnboxedDirect.kt")
public void testReturnUnboxedDirect() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedDirect.kt");
}
@TestMetadata("returnUnboxedFromLambda.kt")
public void testReturnUnboxedFromLambda() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedFromLambda.kt");
}
@TestMetadata("returnUnboxedResume.kt")
public void testReturnUnboxedResume() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedResume.kt");
@@ -3990,11 +3990,21 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/inlineClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("returnBoxedFromLambda.kt")
public void testReturnBoxedFromLambda() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnBoxedFromLambda.kt");
}
@TestMetadata("returnUnboxedDirect.kt")
public void testReturnUnboxedDirect() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedDirect.kt");
}
@TestMetadata("returnUnboxedFromLambda.kt")
public void testReturnUnboxedFromLambda() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedFromLambda.kt");
}
@TestMetadata("returnUnboxedResume.kt")
public void testReturnUnboxedResume() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedResume.kt");
@@ -3990,11 +3990,21 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/inlineClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("returnBoxedFromLambda.kt")
public void testReturnBoxedFromLambda() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnBoxedFromLambda.kt");
}
@TestMetadata("returnUnboxedDirect.kt")
public void testReturnUnboxedDirect() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedDirect.kt");
}
@TestMetadata("returnUnboxedFromLambda.kt")
public void testReturnUnboxedFromLambda() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedFromLambda.kt");
}
@TestMetadata("returnUnboxedResume.kt")
public void testReturnUnboxedResume() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedResume.kt");