JVM: fix inlining of default lambdas of signature (Result) -> Any

They have no `invoke` bridge, and the overridden invoke expectes a boxed
`Result` as an argument.
This commit is contained in:
pyos
2021-06-07 11:55:51 +02:00
committed by max-kammerer
parent a0a14d9e25
commit 392e4fba42
15 changed files with 104 additions and 55 deletions
@@ -1393,6 +1393,11 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt25106.kt");
}
@TestMetadata("lambdaTakesResult.kt")
public void testLambdaTakesResult() throws Exception {
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/lambdaTakesResult.kt");
}
@TestMetadata("noInline.kt")
public void testNoInline() throws Exception {
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt");
@@ -1393,6 +1393,11 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt25106.kt");
}
@TestMetadata("lambdaTakesResult.kt")
public void testLambdaTakesResult() throws Exception {
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/lambdaTakesResult.kt");
}
@TestMetadata("noInline.kt")
public void testNoInline() throws Exception {
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt");
@@ -1393,6 +1393,11 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt25106.kt");
}
@TestMetadata("lambdaTakesResult.kt")
public void testLambdaTakesResult() throws Exception {
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/lambdaTakesResult.kt");
}
@TestMetadata("noInline.kt")
public void testNoInline() throws Exception {
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt");