Support isInitialized intrinsic for lateinit properties

See https://github.com/Kotlin/KEEP/pull/73

 #KT-9327 Fixed
This commit is contained in:
Alexander Udalov
2017-07-12 18:57:15 +03:00
parent 08052e63e9
commit c6263ac8e6
26 changed files with 665 additions and 55 deletions
@@ -13576,6 +13576,39 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
doTest(fileName);
}
@TestMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class IsInitializedAndDeinitialize extends AbstractLightAnalysisModeTest {
public void testAllFilesPresentInIsInitializedAndDeinitialize() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("innerSubclass.kt")
public void testInnerSubclass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/innerSubclass.kt");
doTest(fileName);
}
@TestMetadata("sideEffects.kt")
public void testSideEffects() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/sideEffects.kt");
doTest(fileName);
}
@TestMetadata("simpleIsInitialized.kt")
public void testSimpleIsInitialized() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/simpleIsInitialized.kt");
doTest(fileName);
}
@TestMetadata("topLevelProperty.kt")
public void testTopLevelProperty() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/box/properties/lateinit/local")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)