Differ this/non-this instances for vars initialization in class

When deal with constructed object (not this) treat it like it's fully initialized.

Otherwise (this or access with no receiver) access instruction
should be handled as it was before.

 #KT-6788 Fixed
 #KT-4126 Fixed
This commit is contained in:
Denis Zharkov
2015-02-17 10:23:07 +03:00
parent 1004e016fd
commit 7d963e8e07
17 changed files with 300 additions and 50 deletions
@@ -1764,6 +1764,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("kt4126.kt")
public void testKt4126() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt4126.kt");
doTest(fileName);
}
@TestMetadata("kt4405.kt")
public void testKt4405() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt4405.kt");
@@ -1794,6 +1800,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("kt6788.kt")
public void testKt6788() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt6788.kt");
doTest(fileName);
}
@TestMetadata("kt776.kt")
public void testKt776() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt776.kt");
@@ -1818,6 +1830,24 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("propertiesInitWithOtherInstance.kt")
public void testPropertiesInitWithOtherInstance() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesInitWithOtherInstance.kt");
doTest(fileName);
}
@TestMetadata("propertiesInitWithOtherInstanceInner.kt")
public void testPropertiesInitWithOtherInstanceInner() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesInitWithOtherInstanceInner.kt");
doTest(fileName);
}
@TestMetadata("propertiesInitWithOtherInstanceThisLabel.kt")
public void testPropertiesInitWithOtherInstanceThisLabel() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesInitWithOtherInstanceThisLabel.kt");
doTest(fileName);
}
@TestMetadata("propertiesOrderInPackage.kt")
public void testPropertiesOrderInPackage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesOrderInPackage.kt");
@@ -10451,6 +10481,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("initializationFromOtherInstance.kt")
public void testInitializationFromOtherInstance() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/initializationFromOtherInstance.kt");
doTest(fileName);
}
@TestMetadata("memberAccessBeforeSuperCall.kt")
public void testMemberAccessBeforeSuperCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/memberAccessBeforeSuperCall.kt");