JVM_IR: Do not unbox Result argument inside SAM adapters

#KT-45259 Fixed
This commit is contained in:
Ilmir Usmanov
2021-03-12 19:25:12 +01:00
parent 6fab1305e9
commit 4099dfc7e0
11 changed files with 223 additions and 1 deletions
@@ -13657,6 +13657,29 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractIrJsCodegenBoxES6Test {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
}
public void testAllFilesPresentInFunInterface() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@TestMetadata("argumentIC.kt")
public void testArgumentIC() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentIC.kt");
}
@TestMetadata("argumentResult.kt")
public void testArgumentResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentResult.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/functionNameMangling")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -13114,6 +13114,29 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractIrJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInFunInterface() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("argumentIC.kt")
public void testArgumentIC() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentIC.kt");
}
@TestMetadata("argumentResult.kt")
public void testArgumentResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentResult.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/functionNameMangling")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -13179,6 +13179,29 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInFunInterface() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("argumentIC.kt")
public void testArgumentIC() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentIC.kt");
}
@TestMetadata("argumentResult.kt")
public void testArgumentResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentResult.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/functionNameMangling")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -7365,6 +7365,29 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractIrCodegenBoxWasmTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
}
public void testAllFilesPresentInFunInterface() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/funInterface"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@TestMetadata("argumentIC.kt")
public void testArgumentIC() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentIC.kt");
}
@TestMetadata("argumentResult.kt")
public void testArgumentResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentResult.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/functionNameMangling")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)