[FIR2IR] Fix codegen for lambda with dynamic receiver

#KT-57835 Fixed
This commit is contained in:
Kirill Rakhman
2023-04-11 18:04:19 +02:00
committed by Space Team
parent 1c96a87dca
commit aab1959cc4
17 changed files with 219 additions and 4 deletions
@@ -21626,6 +21626,22 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/js")
@TestDataPath("$PROJECT_ROOT")
public class Js {
@Test
public void testAllFilesPresentInJs() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/js"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@Test
@TestMetadata("lambdaWithDynamicReceiver.kt")
public void testLambdaWithDynamicReceiver() throws Exception {
runTest("compiler/testData/codegen/box/js/lambdaWithDynamicReceiver.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/jvm8")
@TestDataPath("$PROJECT_ROOT")
@@ -21764,6 +21764,22 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/js")
@TestDataPath("$PROJECT_ROOT")
public class Js {
@Test
public void testAllFilesPresentInJs() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/js"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("lambdaWithDynamicReceiver.kt")
public void testLambdaWithDynamicReceiver() throws Exception {
runTest("compiler/testData/codegen/box/js/lambdaWithDynamicReceiver.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/jvm8")
@TestDataPath("$PROJECT_ROOT")
@@ -21764,6 +21764,22 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/js")
@TestDataPath("$PROJECT_ROOT")
public class Js {
@Test
public void testAllFilesPresentInJs() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/js"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("lambdaWithDynamicReceiver.kt")
public void testLambdaWithDynamicReceiver() throws Exception {
runTest("compiler/testData/codegen/box/js/lambdaWithDynamicReceiver.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/jvm8")
@TestDataPath("$PROJECT_ROOT")
@@ -21764,6 +21764,22 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/js")
@TestDataPath("$PROJECT_ROOT")
public class Js {
@Test
public void testAllFilesPresentInJs() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/js"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("lambdaWithDynamicReceiver.kt")
public void testLambdaWithDynamicReceiver() throws Exception {
runTest("compiler/testData/codegen/box/js/lambdaWithDynamicReceiver.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/jvm8")
@TestDataPath("$PROJECT_ROOT")