Fix property lookup in data class component generation
#KT-49812 Fixed #KT-49936 Fixed
This commit is contained in:
+22
@@ -9556,6 +9556,28 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/dataClasses/unitComponent.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/dataClasses/components")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Components {
|
||||
@Test
|
||||
public void testAllFilesPresentInComponents() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/components"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt49812.kt")
|
||||
public void testKt49812() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/dataClasses/components/kt49812.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt49936.kt")
|
||||
public void testKt49936() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/dataClasses/components/kt49936.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/dataClasses/copy")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+22
@@ -9598,6 +9598,28 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/dataClasses/unitComponent.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/dataClasses/components")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Components {
|
||||
@Test
|
||||
public void testAllFilesPresentInComponents() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/components"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt49812.kt")
|
||||
public void testKt49812() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/dataClasses/components/kt49812.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt49936.kt")
|
||||
public void testKt49936() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/dataClasses/components/kt49936.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/dataClasses/copy")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+23
@@ -8380,6 +8380,29 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
runTest("compiler/testData/codegen/box/dataClasses/unitComponent.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/dataClasses/components")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Components extends AbstractIrCodegenBoxWasmTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInComponents() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/components"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("kt49812.kt")
|
||||
public void testKt49812() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/dataClasses/components/kt49812.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt49936.kt")
|
||||
public void testKt49936() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/dataClasses/components/kt49936.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/dataClasses/copy")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user