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

superclass constructor invocation in enum class constructor

XMLWordPrintable

    • b40
    • generic, sparc
    • generic, solaris_8
    • Verified



      Name: ngR10089 Date: 11/26/2003


       
      The latest draft of "A Typesafe Enum Facility for the Javatm Programming
      Language" reads:
          "Constructors cannot chain to a superclass constructor--chaining is
           handled automatically by the compiler."
      However javac (jdk1.5.0-b29) compiles the test below without error.

      --------------- test.java-------------
      enum clss39101a {
          a1, a2;
          int value;
          clss39101a () {
              super();
              value++;
          }
      }
      ---------------------------------------

      New JCK test
      lang/CLSS/clss391/clss39101/clss39101.html
      fails due to this bug.


      ======================================================================

            never Tom Rodriguez
            nvgsunw Nvg Nvg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: