Report a proper error on class object in enum entry or object

CLASS_OBJECT_NOT_ALLOWED instead of MANY_CLASS_OBJECTS
This commit is contained in:
Alexander Udalov
2013-11-21 16:25:10 +04:00
parent 2e4807856f
commit dce9fbb91c
3 changed files with 27 additions and 4 deletions
@@ -2542,6 +2542,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
doTest("compiler/testData/diagnostics/tests/enum/entryShouldBeOfEnumType.kt");
}
@TestMetadata("enumEntryCannotHaveClassObject.kt")
public void testEnumEntryCannotHaveClassObject() throws Exception {
doTest("compiler/testData/diagnostics/tests/enum/enumEntryCannotHaveClassObject.kt");
}
@TestMetadata("enumInheritance.kt")
public void testEnumInheritance() throws Exception {
doTest("compiler/testData/diagnostics/tests/enum/enumInheritance.kt");