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

Cannot reference super before supertype constructor has been called

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 18
    • 18
    • tools
    • None
    • b07
    • 18
    • b27

      Pull request #4376 regressed compilation of all inner classes using <enclosing class>.super pattern in their constructor argument to fail with:
       error: cannot reference super before supertype constructor has been called

      Following source fragment can be used as a minimal test case:
          class EnclClass {
              class InnerClass extends Exception {
                  InnerClass() {
                      super(EnclClass.super.toString());
                  }
              }
          }

            asotona Adam Sotona
            asotona Adam Sotona
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: