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

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • 7
    • Affects Version/s: 7
    • Component/s: tools
    • unknown
    • generic

      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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: