Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6330385

Enum and interface can't compile in on step

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      public class Test {
       public static void main(String[] args) {
         for (E e : E.values()) {
           e.m();
         }
       }
      }

      interface I {
       void m();
      }

      enum E implements I {
       X {
         public void m() {}
       }
      }

      This won't compile with one call to javac.
      But if you separately compile I and E first you can then compile
      Test just fine.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ahe Peter Ahe
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: