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

Regression: creating class inside anonymous inner class featuring varargs constructor issues error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 7
    • Fix Version/s: 7
    • Component/s: tools
    • Subcomponent:
    • CPU:
      unknown
    • OS:
      generic

      Description

      This program doesn't compile:

      class Test {

      Test(String... args) { }

      public void test() {
      new Test() {
      void foo() { new java.io.Serializable() {}; };
      };
      }
      }

      Output from javac:

      TestX.java:21: error: internal error; cannot instantiate <anonymous Test$1$1>() at <anonymous Serializable> to ()
      void foo() { new java.io.Serializable() {}; };
      ^
      1 error

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mcimadamore Maurizio Cimadamore
              Reporter:
              mcimadamore Maurizio Cimadamore
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: