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

superclass constructor invocation in enum class constructor

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b40
    • CPU:
      generic, sparc
    • OS:
      generic, solaris_8
    • Verification:
      Verified

      Description



      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.


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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: