Don't create NamespaceType for enum entries
Enum entry expressions have the type of their enum, so it shouldn't be possible to access static nested classes of enum entries from outside. This fixes BlackBoxCodegenTestGenerated$CallableReference.testEnumNameMethod
This commit is contained in:
@@ -2532,6 +2532,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/diagnostics/tests/enum"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("dontCreateNamespaceTypeForEnumEntry.kt")
|
||||
public void testDontCreateNamespaceTypeForEnumEntry() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/enum/dontCreateNamespaceTypeForEnumEntry.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("entryShouldBeOfEnumType.kt")
|
||||
public void testEntryShouldBeOfEnumType() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/enum/entryShouldBeOfEnumType.kt");
|
||||
|
||||
Reference in New Issue
Block a user