[PSI2IR] Do not generate property reference setter if inaccessible.

Fixes KT-45064.
This commit is contained in:
Mads Ager
2021-02-22 14:22:10 +01:00
committed by Alexander Udalov
parent d44799fa78
commit 8852323a76
10 changed files with 64 additions and 5 deletions
@@ -2324,6 +2324,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/callableReference/property/accessViaSubclass.kt");
}
@TestMetadata("accessorForPropertyWithPrivateSetter.kt")
public void testAccessorForPropertyWithPrivateSetter() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/property/accessorForPropertyWithPrivateSetter.kt");
}
public void testAllFilesPresentInProperty() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@@ -2324,6 +2324,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/callableReference/property/accessViaSubclass.kt");
}
@TestMetadata("accessorForPropertyWithPrivateSetter.kt")
public void testAccessorForPropertyWithPrivateSetter() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/property/accessorForPropertyWithPrivateSetter.kt");
}
public void testAllFilesPresentInProperty() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@@ -2324,6 +2324,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/callableReference/property/accessViaSubclass.kt");
}
@TestMetadata("accessorForPropertyWithPrivateSetter.kt")
public void testAccessorForPropertyWithPrivateSetter() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/property/accessorForPropertyWithPrivateSetter.kt");
}
public void testAllFilesPresentInProperty() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@@ -1714,6 +1714,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
}
@TestMetadata("accessorForPropertyWithPrivateSetter.kt")
public void testAccessorForPropertyWithPrivateSetter() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/property/accessorForPropertyWithPrivateSetter.kt");
}
public void testAllFilesPresentInProperty() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/property"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}