Initializer is now required for mutable properties with backing fields and open or custom setter #KT-9449 Fixed

Setters without body are not taken into account accordingly to KT-9449.
Old INITIALIZATION_USING_BACKING_FIELD_SETTER are both dropped.
This commit is contained in:
Mikhail Glukhikh
2015-10-14 15:25:25 +03:00
parent 9c9ab671b3
commit c0faf82f77
9 changed files with 112 additions and 26 deletions
@@ -1524,6 +1524,18 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("InitCustomSetter.kt")
public void testInitCustomSetter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/InitCustomSetter.kt");
doTest(fileName);
}
@TestMetadata("InitOpenSetter.kt")
public void testInitOpenSetter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/InitOpenSetter.kt");
doTest(fileName);
}
@TestMetadata("kt782packageLevel.kt")
public void testKt782packageLevel() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/kt782packageLevel.kt");
@@ -9328,16 +9340,6 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
}
}
@TestMetadata("compiler/testData/diagnostics/tests/jdk-annotations")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Jdk_annotations extends AbstractJetDiagnosticsTest {
public void testAllFilesPresentInJdk_annotations() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/jdk-annotations"), Pattern.compile("^(.+)\\.kt$"), true);
}
}
@TestMetadata("compiler/testData/diagnostics/tests/labels")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)