### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core.tests.compiler Index: src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java,v retrieving revision 1.144 diff -u -r1.144 AnnotationTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 6 Mar 2006 14:40:40 -0000 1.144 +++ src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 28 Mar 2006 04:20:24 -0000 @@ -38,7 +38,7 @@ // All specified tests which do not belong to the class are skipped... static { // TESTS_NAMES = new String[] { "test127" }; -// TESTS_NUMBERS = new int[] { 188 }; +// TESTS_NUMBERS = new int[] { 196 }; // TESTS_RANGE = new int[] { 169, 180 }; } @@ -6413,4 +6413,23 @@ "Zork cannot be resolved to a type\n" + "----------\n"); } +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=133440 +public void test196() { + this.runNegativeTest( + new String[] { + "X.java", + "public @interface X {\n" + + " enum MyEnum {\n" + + " VAL_1, VAL_2\n" + + " }\n" + + " public MyEnum theValue() default null;\n" + + "}" + }, + "----------\n" + + "1. ERROR in X.java (at line 5)\n" + + " public MyEnum theValue() default null;\n" + + " ^^^^\n" + + "The value for annotation attribute X.theValue must be a constant expression\n" + + "----------\n"); +} }