Fix isInitialized for companion lateinit properties

Instead of trying to access a missing field `Foo.foo`, call the
synthetic accessor `Foo.access$getFoo$cp` which, as per previous commit,
no longer contains the lateinit assertion

 #KT-21862 Fixed
This commit is contained in:
Alexander Udalov
2018-11-19 19:32:34 +01:00
parent 43413fcc44
commit 8c74312cf6
7 changed files with 77 additions and 2 deletions
@@ -17860,6 +17860,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("companionObjectField.kt")
public void testCompanionObjectField() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/companionObjectField.kt");
}
@TestMetadata("emptyLhs.kt")
public void testEmptyLhs() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/emptyLhs.kt");