Prohibit accessing nested classes/objects of class object using class literal

The fqname of class should be clear from code
Example: can't shorten A.Default.B.Default.C to A.B.C
Also fixes problem when nested class of enum class could be accessed via enum entry
This commit is contained in:
Pavel V. Talanov
2015-02-18 19:22:25 +03:00
parent 86bbb117ef
commit ffabe19229
25 changed files with 480 additions and 44 deletions
@@ -1540,6 +1540,18 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("InnerClassAccessThroughClassObject.kt")
public void testInnerClassAccessThroughClassObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.kt");
doTest(fileName);
}
@TestMetadata("InnerClassAccessThroughEnum.kt")
public void testInnerClassAccessThroughEnum() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum.kt");
doTest(fileName);
}
@TestMetadata("InnerClassClassObject.kt")
public void testInnerClassClassObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/InnerClassClassObject.kt");