langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java
changeset 28459 48a68a485760
parent 27224 228abfa87080
child 29842 826ac2519523
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java	Fri Jan 16 12:02:41 2015 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java	Fri Jan 16 14:47:25 2015 +0100
@@ -1175,6 +1175,16 @@
             return v.visitClassSymbol(this, p);
         }
 
+        public void markAbstractIfNeeded(Types types) {
+            if (types.enter.getEnv(this) != null &&
+                (flags() & ENUM) != 0 && types.supertype(type).tsym == types.syms.enumSym &&
+                (flags() & (FINAL | ABSTRACT)) == 0) {
+                if (types.firstUnimplementedAbstract(this) != null)
+                    // add the ABSTRACT flag to an enum
+                    flags_field |= ABSTRACT;
+            }
+        }
+
         /**Resets the Symbol into the state good for next round of annotation processing.*/
         public void reset() {
             kind = TYP;